Reputation: 23
I'm follow an online railstutorial
Everything is ok but when trying to push the master directory to heroku. When it come to this:
Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.0
install everything but sqlite3, here it output:
Installing sqlite3 (0.1.1) /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:164:in `install': sqlite3 requires Ruby version >= 1.9.1. (Gem::InstallError)
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:100:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:55:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/cli.rb:217:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/bin/bundle:13
from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
FAILED:
! Heroku push rejected, failed to install gems via Bundler
Now the thing is: I am using ruby 1.9.2, 1.8.7 is not even installed. when I list my local gems, bundle has this two versions: bundler (1.0.2, 1.0.1) (I don't know why) So it seems that there is something bad with the paths but I don't know how to solve it. Thanks for your help.
Upvotes: 2
Views: 4615
Reputation: 1
Make sure you install pg. At least that is what I did wrong. Here you will find some help doing that. The groupthingy also look like sound advice
Upvotes: 0
Reputation: 4409
The reason 1.8.7 is showing up in your log is that is the default ruby version on heroku. If you want to use 1.9.2, see the doc on switching stacks: http://docs.heroku.com/stack
Upvotes: 0
Reputation: 24840
You're going off on the wrong path - Heroku doesn't run Sqlite, it runs PostgreSQL. When you deploy your app it creates a new database.yml file for you. So you shouldn't specify Sqlite in your gemfile - you should only specify it for your development environment.
Something like this:
group :production, :staging do
gem "pg"
end
group :development, :test do
gem "sqlite3-ruby", :require => "sqlite3"
end
If you want to read more about Heroku database stuff, go here. I asked a similar question (and got my answer) here.
Upvotes: 14
Reputation: 34972
Do you really mean to install sqlite on Heroku? Shouldn't that gem be limited to your development environment only, not production? You can't do much with sqlite on Heroku seeing how you can't write to the filesystem, nor can you specify a custom database (Heroku fully manages your database setting on pushed apps).
Upvotes: 0
Reputation: 68006
Ruby 1.9 isn't yet supported on heroku. Try to live with 1.8.7 (for example, downgrade a little your sqlite3 gem).
Upvotes: 0