Gautam
Gautam

Reputation: 7958

Unable to get google-appengine for Jruby to work

I have been trying all day to get app-engine sdk to work nothing has really shaped up .

I emptied a gemset and installed google-appengine gem by executing

sudo gem install google-appengine

I have the following gems installed

[gdev@vbox-gdev GAE]$ sudo gem list
Password: 

*** LOCAL GEMS ***

appengine-apis (0.0.24)
appengine-rack (0.0.13)
appengine-sdk (1.4.3)
appengine-tools (0.0.17)
bundler08 (0.8.5)
google-appengine (0.0.21)
jruby-jars (1.5.6)
jruby-rack (1.0.4)
rack (1.3.5)
rubyzip (0.9.4)
[gdev@vbox-gdev GAE]$ 

and as mentioned in this tutorial (http://code.google.com/p/appengine-jruby/wiki/GettingStarted) I am using CRuby instead of Jruby

[gdev@vbox-gdev GAE]$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

I am getting an error in the first step itself

[gdev@vbox-gdev GAE]$ appcfg.rb generate_app hello
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
=> Generating gemfile
/usr/lib/ruby/gems/1.9.1/gems/appengine-tools-0.0.17/lib/appengine-tools/gem_bundler.rb:63: warning: already initialized constant RUBY_ENGINE
=> Bundling gems
ERROR:  While executing gem ... (RuntimeError)
    Unknown command bundle
[gdev@vbox-gdev GAE]$ 

Installing bundler(either version 1.0.21 or 0.8) throws the same error .

Any suggestions on solving this ?

PS: I am using arch linux on a virtualbox

Upvotes: 2

Views: 945

Answers (2)

Philip
Philip

Reputation: 3500

First of all you should stick to Ruby 1.8.7. 1.9.x never really took off on appengine-jruby, although it's possible. Moreover you should use Rubygems 1.3.7.

My local gems are these:

appengine-rack (0.0.13)
appengine-sdk (1.4.3)
appengine-tools (0.0.17)
bundler (1.0.21)
bundler08 (0.8.5)
google-appengine (0.0.21)
haml (3.1.4)
jruby-jars (1.5.6)
jruby-rack (1.0.4)
rack (1.4.0)
rubyzip (0.9.5)
sass (3.1.12)

But guess what, except for the google-appengine gem those aren't really important. Much much more important is this: ls .gems/bundler_gems/jruby/1.8/gems:

addressable-2.2.7              extlib-0.9.15        multipart-post-1.1.5
appengine-apis-0.0.22          faraday-0.7.6        oauth2-0.5.2
appengine-rack-0.0.12          haml-3.1.4           rack-1.2.1
Basaah-pony-gae-0.2.1          jruby-jars-1.5.6     rack-flash-0.1.2
bouncy-castle-java-1.5.0146.1  jruby-openssl-0.7.2  sass-3.1.15
dm-appengine-0.0.9             jruby-rack-1.0.5     sinatra-1.2.7
dm-core-0.10.2                 json_pure-1.6.5      tilt-1.3.3
dm-validations-0.10.2          multi_json-1.1.0

That at least will give you an easy start. (You can configure the version in the Gemfile)

By the way, good that you use Linux.

Upvotes: 2

James V
James V

Reputation: 103

hmm...for one, I'm not sure how you set up your jruby exactly, or which version of jruby you're running. You should be running jruby 1.5.5 on appengine from memory.

I strongly recommend following this guide: http://www.khelll.com/blog/ruby/google-app-engine-jruby-sinatra-and-some-fun/

After about 3 or 4 similar guides, this was the only configuration that worked for me. I'm having some issues with ssl, but the app runs using the app engine gem and deploys to app engine successfully.

Upvotes: 1

Related Questions