使用Rubber

时间:2015-05-28 08:27:04

标签: ruby-on-rails amazon-ec2 jruby jrubyonrails rubber

我正在尝试使用Rubber将基本的JRuby on Rails应用程序部署到EC2。我正在关注this指南,唯一的区别是我正在使用JRuby。

这可能吗?我可以在JRuby中使用其中一个提供的模板(例如complete_passenger_postgresql)吗?

我看到rubber-ruby.yml文件有一行你可以指定ruby_version。我是否需要指定我想使用JRuby?

我应该使用不同的模板吗?

当我尝试命令'cap rubber:create_staging'时,我收到以下错误

  

NoMethodError:nil的未定义方法`readLine':NilClass                                get_line at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/highline-1.7.2/lib/highline.rb:863                            get_response at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/highline-1.7.2/lib/highline.rb:891                                     在/Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/highline-1.7.2/lib/highline.rb:264询问                                 get_env at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/rubber-3.0.1/lib/rubber/recipes/rubber/utils.rb:191                                  (eval)atUsers/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/rubber-3.0.1/lib/rubber/recipes/rubber/utils.rb:17                           org / jruby / RubyBasicObject.java中的instance_eval:1641                    invoke_task_directly at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138     invoke_task_directly_with_callbacks at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25                            execute_task at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89                   find_and_execute_task at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101               execute_requested_actions atUsers/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:46                                    每个在org / jruby / RubyArray.java:1569               /_resers/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:45上的execute_requested_actions     execute_requested_actions_with_help at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/help.rb:19                                执行! at /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:34                                 在/Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:14执行                                  (root)atUsers/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/bin/cap:4                                    在org / jruby / RubyKernel.java中加载:969                                  (root)atUsers/pk/.rvm/gems/jruby-9.0.0.0.pre1/bin/cap:1                                    eval at org / jruby / RubyKernel.java:990                              脚本 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/bin/jruby_executable_hooks:15

1 个答案:

答案 0 :(得分:0)

jruby-9.0.0.0.pre1 是一个预发行版,因为还有另一个 pre2 请尝试一下,如果不能解决问题,请检查是否有效在报告问题之前使用最新的jruby-1.7.x。