Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you obtain `heroku run rails --version` for a seeming Rails version mismatch?

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:

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:

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.

like image 528
ylluminate Avatar asked Jul 27 '11 18:07

ylluminate


2 Answers

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.

like image 58
ylluminate Avatar answered Nov 10 '22 01:11

ylluminate


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.

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

like image 27
Eric Davis Avatar answered Nov 10 '22 02:11

Eric Davis