Closed zhufenggood closed 10 years ago
Actually, I think this would be better solved with better instructions on the README.
ruby script/publish
will just default to whichever ruby you have installed. And it won't use the gem in the bundle.
e.g. (untested)
cd script
bundle install
./publish
It seems you failed because you try to run the command in not a cloned repository,
but in a downloaded one.
The current script uses git-rev-parse
to generate a file name.
So If I write one possible full procedure,
$ git clone https://github.com/ruby-hacking-guide/ruby-hacking-guide.github.com
$ cd ruby-hacing-guide.github.com
$ bundle install
$ gem install eeepub
$ ruby script/publish or ./script/publish # I guess both way would work.
And the utf-8 comments would become unnecessary if you use Ruby 2.0.
@markburns You are right. Changing README is better and simple solution.
Will accept a pull request updating it :)
On Wednesday, 2 October 2013, zhufenggood wrote:
@markburns https://github.com/markburns you are right. Change README is better and simple solution.
— Reply to this email directly or view it on GitHubhttps://github.com/ruby-hacking-guide/ruby-hacking-guide.github.com/pull/28#issuecomment-25580558 .
My apologize. There's a warning about "Not a git repository" but it seems not the cause of this failure.
I guess we can solve this by updating script/Gemfile to use rubyzip < 1.0.0 and add the instruction on README the following line
$ cd script
@zhufenggood Are you willing to create a pull request to fix this? If you are not, I'll just update README and script/Gemfile.
Or If we don't mind the dependency to rubyzip
is written Gemfile, not script/Gemfile,
probably just merging this request is sufficient.
I personally don't have much opinion about it.
cd script
./publish
It seems this way does not work properly,
changing directory before jekyll build
is necessary in this case.
If you let me take care of it,
I'll just add this line before $ gem install eeepub
on README
$ gem install rubyzip -v 0.9.9
@ocha You could update README or Gemfile to solve this, I will not pull a request.
btw, recent publish script also depends on calibre to make output more sane and also it generates more formats.
In the ticket #31 I left links to the outputs on current master, if you want to check it quickly
@zhufenggood I updated README. Probably this is a workaround which is temporarily necessary, it will eventually be fixed by either eeepub or rubyzip. Thank you for reporting this problem :)
@avsej Thank you very much for great works!! I also added your links to outputs to README because I think most people would like to download the generated files rather than generating by themselves. But of course you can remove them from README if you mind it.
rubyzip version problem,unable to generate epub file.