heroku run rails --version
为了确定安装在 heroku 上的应用程序堆栈上的 rails gem 的实际版本号,我尝试了几次迭代。到目前为止,还没有成功。例如,即使运行heroku run "rails --version"
返回:
Running rails --version attached to terminal... ! That feature is not available on this app's stack
有任何想法吗?
最终我问的原因是我收到以下错误:
can't activate rails (= 2.3.12, runtime), already activated rails-2.3.5. Make sure all dependencies are added to Gemfile.
/usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:108:in `block in cripple_rubygems'
我并不完全遵循这一点,因为它似乎与 Gemfile 中的实际内容不匹配:
source :rubygems
gem 'rails', '2.3.12'
# gem 'rails', '2.3.5' ## Was originally here, but I changed it to that above in hopes to resolve issue
gem 'i18n', '0.4.2'
gem 'giternal'
gem 'heroku'
其来源是尝试在 Heroku 上运行 ChiliProject,这将非常有用。如果有人想登上顶峰,原始文章就在这里。它是 Redmine 的绝佳替代品。