【问题标题】:Heroku run process using JRuby 1.7 and Rails 3.2 hangsHeroku 使用 JRuby 1.7 和 Rails 3.2 运行进程挂起
【发布时间】:2012-11-18 05:44:26
【问题描述】:

我能够在 Heroku 上使用 JRuby 和 trinidad 运行 Web 进程。我在我的 Gemfile 中使用它,这似乎是目前自定义 heroku buildpack 的最佳实践:

ruby "1.9.3", :engine => "jruby", :engine_version => "1.7.0"

但是,在尝试通过以下方式加载数据库(或连接到 rails 控制台)时:

heroku run rake db:schema:load

heroku run console

命令只是挂起。跟踪 heroku 日志,我看到进程启动并没有错误地完成,但我从来没有在本地命令行上得到任何输出,它只是挂起。

2012-11-16T16:02:46+00:00 heroku[api]: Starting process with command `bundle exec rake db:schema:load`
2012-11-16T16:02:51+00:00 heroku[run.1]: Awaiting client
2012-11-16T16:02:51+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:schema:load`
2012-11-16T16:02:51+00:00 heroku[run.1]: State changed from starting to up
2012-11-16T16:02:51+00:00 heroku[run.1]: State changed from starting to up
2012-11-16T16:03:21+00:00 heroku[run.1]: State changed from up to complete
2012-11-16T16:03:21+00:00 heroku[run.1]: State changed from up to complete
2012-11-16T16:03:21+00:00 heroku[run.1]: Process exited with status 0 

我猜我需要在 Procfile 中添加一个 rake 和控制台项,并尝试了一些不同的组合,但没有任何效果。它总是挂起。我也没有看到任何其他人的 JRuby Procfile 包括这些项目。

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 heroku jruby


    【解决方案1】:

    结果证明这是从 JRuby 中运行 heroku gem 的问题。从 JRuby(MRI 1.9.3)外部通过 heroku 工具带运行命令可以正常工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-23
      • 1970-01-01
      • 1970-01-01
      • 2013-11-27
      • 1970-01-01
      • 2015-01-25
      相关资源
      最近更新 更多