无法让 google-appengine 让 Jruby 工作

发布于 2024-12-17 14:05:13 字数 1544 浏览 1 评论 0原文

我一整天都在尝试让 app-engine sdk 工作,但没有任何进展。

我清空了 gemset 并通过执行

sudo gem install google-appengine 安装了 google-appengine

gem我安装了以下 gem

[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]$ 

,如 教程 (http://code.google.com/p/appengine-jruby/wiki/GettingStarted) 我使用的是 CRuby 而不是 Jruby

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

我在第一步本身中遇到错误

[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]$ 

安装 bundler(版本 1.0.21 或 0.8)会抛出相同的错误。

关于解决这个问题有什么建议吗?

PS:我在 virtualbox 上使用 arch linux

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一抹微笑 2024-12-24 14:05:13

首先,您应该坚持使用 Ruby 1.8.7。 1.9.x 从未在 appengine-jruby 上真正起飞,尽管有可能。此外,您应该使用 Rubygems 1.3.7。

我的本地宝石是这些:

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)

但你猜怎么着,除了 google-appengine gem 之外,这些并不真正重要。更重要的是: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

这至少会给您一个轻松的开始。 (您可以在 Gemfile 中配置版本)

顺便说一句,很好,您使用 Linux。

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.

审判长 2024-12-24 14:05:13

嗯...一方面,我不确定您如何准确设置 jruby,或者您正在运行哪个版本的 jruby。您应该从内存中在 appengine 上运行 jruby 1.5.5。

我强烈建议遵循本指南:http ://www.khelll.com/blog/ruby/google-app-engine-jruby-sinatra-and-some-fun/

经过大约 3 或 4 个类似的指南后,这是唯一对我有用的配置。我在 ssl 方面遇到一些问题,但该应用程序使用应用程序引擎 gem 运行并成功部署到应用程序引擎。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文