Brain dump because mine is fried with googling and slamming my head on the computer. Any help or clues would be GREATLY appreciated!
I manage my gems via rvm.
$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0]
$ rails -v
Rails 4.0.0.beta1
Then when I want to create a brand new app from scratch
$ rails new brand_new_app
create
create README.rdoc
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ cd brand_new_app
Then I initialize a git repo, add the app I just created. I then create a heroku instance
brand_new_app $ heroku create
Git remote heroku added
Then I try and deploy to heroku but it fails on the active support gem.
brand_new_app $ git push heroku master
Counting objects: 62, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (50/50), done.
Writing objects: 100% (62/62), 20.54 KiB, done.
Total 62 (delta 2), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.3)
Installing i18n (0.6.4)
Installing minitest (4.6.2)
Installing multi_json (1.6.1)
Installing atomic (1.0.1)
Installing thread_safe (0.1.0)
Installing tzinfo (0.3.37)
Installing activesupport (4.0.0.beta1)
Gem::InstallError: activesupport requires Ruby version >= 1.9.3.
An error occurred while installing activesupport (4.0.0.beta1), and Bundler
cannot continue.
Make sure that `gem install activesupport -v '4.0.0.beta1'` succeeds before
bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
I have imploded rvm (idk why, mainly bc I was frustrated) and I have checked every place possible. I created the rails app without any special settings, it is just a normal install. If anyone has any hints that could lead me to the right direction, please send them my way! I appreciate you reading this far!
You should put a ruby line in your Gemfile like is explained in the heroku documentation.
Just add the line ruby "2.0.0"
beneath source "https://rubygems.org"
in your Gemfile.
https://blog.heroku.com/archives/2012/11/5/ruby-2-preview-on-heroku
I have tried this, and this works for heroku. Apparently Rails 4 is not compatible with different ruby versions. This is kind of odd, since they say here that:
Ruby 2.0 is the preferred Ruby to use with Rails 4.0.
http://weblog.rubyonrails.org/2013/2/25/Rails-4-0-beta1/
Apparently preferred, means required.
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With