google-code-export / appengine-jruby

Automatically exported from code.google.com/p/appengine-jruby
0 stars 0 forks source link

Sinatra LoadError on Linux #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

I was able to 'gem bundle' everything, so I have sinatra in my
./.gems/bundler_gems directory.  However, when I go to run the appcfg.rb
bundle it says it can't load sinatra.  I have tested with bundler 0.7 and 0.6.

This can be reproduced on Linux by following the guide here:
http://code.google.com/p/appengine-jruby/wiki/SinatraReloaded

I did have to install the gems in this example as root so that
appengine-tools could be loaded.  Now, this error shows up.  Note, I am
running appcfg's bundle as root just to make sure it is not permissions.

I have ruby 1.8.7 and rubygems 1.3.5.  

{{{
james@dog ~/SinatraReloaded
$ sudo appcfg.rb bundle .
=> Generating configuration files
file:/usr/lib/ruby/gems/1.8/gems/appengine-jruby-jars-0.0.6/lib/appengine-jruby-
rubygems-0.0.6.jar!/rubygems/custom_require.rb:31:in
`require': no such file to load -- sinatra (LoadError)
    from
file:/usr/lib/ruby/gems/1.8/gems/appengine-jruby-jars-0.0.6/lib/appengine-jruby-
rubygems-0.0.6.jar!/rubygems/custom_require.rb:31:in
`require'
    from ./guestbook.rb:2
    from ./guestbook.rb:31:in `require'
    from
file:/usr/lib/ruby/gems/1.8/gems/appengine-jruby-jars-0.0.6/lib/appengine-jruby-
rubygems-0.0.6.jar!/rubygems/custom_require.rb:31:in
`require'
    from config.ru:3:in `generate_xml'
Error executing jruby
}}}

Original issue reported on code.google.com by jSlim...@gmail.com on 6 Dec 2009 at 11:26

GoogleCodeExporter commented 9 years ago
Little patch. Add this in your app

$LOAD_PATH << 'bundler_gems'
require 'environment'

Original comment by pftg.sof on 8 Dec 2009 at 4:13