【问题标题】:Deploy JRuby on Rails to AWS EC2 with Rubber使用 Rubber 将 Ruby on Rails 部署到 AWS EC2
【发布时间】:2015-05-28 08:27:04
【问题描述】:

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

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

我看到 Rubber-ruby.yml 文件中有一行可以指定 ruby​​_version。我需要指定我想使用 JRuby 吗?

我应该使用其他模板吗?

目前,当我尝试命令“cap Rubber:create_staging”时出现以下错误

NoMethodError: nil:NilClass 的未定义方法 `readLine' /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/highline-1.7.2/lib/highline.rb:863 处的 get_line /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/highline-1.7.2/lib/highline.rb:891 处的 get_response 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/highline-1.7.2/lib/highline.rb:264 询问 get_env 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/rubber-3.0.1/lib/rubber/recipes/rubber/utils.rb:191 (评估)在/Users/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:1641 上的 instance_eval 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138 直接调用任务 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25 处调用_task_directly_with_callbacks execute_task 在/Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101 找到_and_execute_task /Users/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 execute_requested_actions 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:45 execute_requested_actions_with_help 在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/lib/capistrano/cli/help.rb:19 执行!在 /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 处执行 (根)在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/gems/capistrano-2.15.5/bin/cap:4 在 org/jruby/RubyKernel.java:969 加载 (根)在 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/bin/cap:1 在 org/jruby/RubyKernel.java:990 进行评估 脚本位于 /Users/pk/.rvm/gems/jruby-9.0.0.0.pre1/bin/jruby_executable_hooks:15

【问题讨论】:

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


    【解决方案1】:

    jruby-9.0.0.0.pre1 是一个预发布版本,因为还有另一个 pre2 请尝试一下,如果这不起作用,您应该检查是否有效在报告问题之前使用最新的 jruby-1.7.x。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-03
      • 1970-01-01
      • 1970-01-01
      • 2013-03-15
      • 2023-03-31
      • 2012-12-01
      • 2012-07-26
      相关资源
      最近更新 更多