Michael Franzl
2010-Jul-21 16:52 UTC
[webgen-users] no such file to load -- webgen/webgentask
When I execute `rake` inside of a new webgen-0.5.12 project with ruby1.8 there is the error no such file to load -- webgen/webgentask /my/dir/Rakefile:11:in `require'' With ruby1.9 it works. Michael
Thomas Leitner
2010-Aug-04 05:52 UTC
[webgen-users] no such file to load -- webgen/webgentask
On 2010-07-21 18:52 +0200 Michael Franzl wrote:> When I execute `rake` inside of a new webgen-0.5.12 project with > ruby1.8 there is the error > > no such file to load -- webgen/webgentask > /my/dir/Rakefile:11:in `require''Can you try running ruby -rubygems -S rake in the directory with Ruby 1.8? Maybe it is just that rubygems is not loaded and therefore webgen cannot be autoloaded. This would not be a problem under Ruby 1.9 because rubygems is always loaded there. -- Thomas
Michael Franzl
2010-Aug-09 08:08 UTC
[webgen-users] no such file to load -- webgen/webgentask
On 08/04/2010 07:52 AM, Thomas Leitner wrote:> Can you try running > > ruby -rubygems -S rakeThis works without error. But `rake` doesn''t with Ruby 1.8. Michael
Thomas Leitner
2010-Aug-09 08:49 UTC
[webgen-users] no such file to load -- webgen/webgentask
On 2010-08-09 10:08 +0200 Michael Franzl wrote:> On 08/04/2010 07:52 AM, Thomas Leitner wrote: > > Can you try running > > > > ruby -rubygems -S rake > > This works without error. But `rake` doesn''t with Ruby 1.8.Since Ruby 1.9 comes with Rubygems preinstalled and in the load path, rake can find the webgen task from the webgen gem without problems. However, Ruby 1.8 does not automatically load rubygems, so you have to do this yourself, either by setting `RUBYOPT=-rubygems` or by using rake like shown above. If you use the version with the environment variable `RUBYOPT`, the webgen task will be found regardless of the Ruby version. -- Thomas