你怎么能得到`heroku run rails --version`看似Rails版本不匹配?

时间:2021-03-02 00:18:58

I've attempted several iterations of heroku run rails --version in order to ascertain the actual version number of the rails gem installed on an app stack on heroku. Nothing has returned success so far. For example, even running heroku run "rails --version" returns:

我已经尝试了几次heroku run rails --version的迭代,以确定在heroku上的app堆栈上安装的rails gem的实际版本号。到目前为止,没有任何成功。例如,即使运行heroku运行“rails --version”返回:

Running rails --version attached to terminal...  !   That feature is not available on this app's stack

Any ideas?

Ultimately the reason I ask is that I'm getting the following error:

最后我问的原因是我收到以下错误:

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'

Which I'm not entirely following in that it would seem that there is a mismatch from what is actuallly in the Gemfile:

我并没有完全遵循,因为它似乎与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' 

The source of this is an attempt to run ChiliProject on Heroku, which would be exceptionally useful. The original article is here if anyone would like to take a peak. It's a great replacement fork for Redmine.

这个来源是尝试在Heroku上运行ChiliProject,这将非常有用。如果有人想要达到顶峰,那么原始文章就在这里。对于Redmine来说,这是一个很好的替代品。

2 个解决方案

#1


13  

On the Heroku Cedar stack you can run heroku run bash --app appname and then vai the shell simply run rails --version which will return the version number.

在Heroku Cedar堆栈上你可以运行heroku运行bash --app appname,然后vai shell只需运行rails --version,它将返回版本号。

#2


1  

What version of ChiliProject? Our recent 2.0.0 version already has a Gemfile and is configured for Rails 2.3.12 out of the box. ChiliProject 1.x and Redmine are on older versions of Rails (2.3.5 and 2.3.11) and don't use Bundler at all.

什么版本的ChiliProject?我们最近的2.0.0版本已经有一个Gemfile,并且开箱即用于Rails 2.3.12。 ChiliProject 1.x和Redmine是旧版本的Rails(2.3.5和2.3.11),根本不使用Bundler。

Asking questions like this on the ChiliProject Forums will probably get you a better response in the future.

在ChiliProject论坛上提出这样的问题可能会让你在未来得到更好的回应。

#1


13  

On the Heroku Cedar stack you can run heroku run bash --app appname and then vai the shell simply run rails --version which will return the version number.

在Heroku Cedar堆栈上你可以运行heroku运行bash --app appname,然后vai shell只需运行rails --version,它将返回版本号。

#2


1  

What version of ChiliProject? Our recent 2.0.0 version already has a Gemfile and is configured for Rails 2.3.12 out of the box. ChiliProject 1.x and Redmine are on older versions of Rails (2.3.5 and 2.3.11) and don't use Bundler at all.

什么版本的ChiliProject?我们最近的2.0.0版本已经有一个Gemfile,并且开箱即用于Rails 2.3.12。 ChiliProject 1.x和Redmine是旧版本的Rails(2.3.5和2.3.11),根本不使用Bundler。

Asking questions like this on the ChiliProject Forums will probably get you a better response in the future.

在ChiliProject论坛上提出这样的问题可能会让你在未来得到更好的回应。