Gaba, There can be a number of reasons and the advice to check those
logs will help. Things to watch out for are analyzing what may be
different on heroku than with your local copy. Simple things are like
is the type of database the same, are you trying to upload a file when
the app is not configured to work with external storage, is there
something in your local db that you are so used to having set that
might not on the one heroku is looking at etc.
One of the things I noticed that it said is:
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:
in 'require': no such file to load --sqlite3 <LoadError>
Do you that's it? Basically what happened was I first installed Ruby
1.9.2, then Rails, but ran into some problems, so then installed
instantrails, which included the whole package, but used ruby 1.8.7.
Now, sqlite3 was installed as part of that, but I'm not sure why I am
getting this error. How do I check to make sure the migrations took
place, etc.?
Do you that’s it? Basically what happened was I first installed Ruby
1.9.2, then Rails, but ran into some problems, so then installed
instantrails, which included the whole package, but used ruby 1.8.7.
Now, sqlite3 was installed as part of that, but I’m not sure why I am
getting this error. How do I check to make sure the migrations took
place, etc.?
First, when you push your app to heroku, make sure you are not getting any errors. Once you push to heroku run:
heroku rake db:create db:migrate (and if you want, db:seed)
I dont think you have to do db:create but I do it just for the heck of it.
Heroku does not automatically create your db.
Not sure if this is your issue. If you still have trouble I recommend to delete your heroku app and then start over creating it on heroku. Save all the output you get from heroku and if you hit a snag it will help a lot if you would post the progression here so we can be of more specific help.
Check your database.yml, Gemfile, and Gemfile.lock. Make sure you are specifying that you want to use PostgreSQL which is the database that Heroku uses not SQLite3. You’re development environment should match production the best that it can. That means that you should be using the same database types as well as web server (Thin is used by Heroku). You’ll knock out that majority of your problems if you keep your environments as closely inline as possible.
Check your database.yml, Gemfile, and Gemfile.lock. Make sure you are
specifying that you want to use PostgreSQL which is the database that Heroku
uses not SQLite3.
Sorry, that's pointless. Heroku doesn't care about your database.yml
file at all. As long as you don't have any proprietary SQL statements
in your app or migrations, it should move between environments with
no issues.
You're (sic) development environment should match production the
best that it can.
Generally that's a good ideal to strive for, but with a cloud service like
Heroku it's irrelevant. I develop locally with MySQL and mongrel or
unicorn and push those apps to Heroku generally without issues.
But in the absence of actual log data, who knows what's going on?
Check your database.yml, Gemfile, and Gemfile.lock. Make sure you are
specifying that you want to use PostgreSQL which is the database that Heroku
uses not SQLite3.
Sorry, that’s pointless. Heroku doesn’t care about your database.yml
file at all. As long as you don’t have any proprietary SQL statements
in your app or migrations, it should move between environments with
no issues.
You’re (sic) development environment should match production the
best that it can.
Generally that’s a good ideal to strive for, but with a cloud service like
Heroku it’s irrelevant. I develop locally with MySQL and mongrel or
unicorn and push those apps to Heroku generally without issues.
Far from pointless or irrelevant. I develop locally in MySQL pushed to Heroku, crash. PostgresSQL didn’t play nice with the Rails migration statements for a column change. Fixed issue, pushed to Heroku, crash. Heroku didn’t like the gem I had installed. Fixed issue, pushed to Heroku, crash. Heroku didn’t like where SSL keys were stored or created. Fixed issue, pushed to Heroku, crash. Thin was more temperamental about code than Mongrel was. Worked in development and not in production. Why? Environment. You are setting yourself up for issue after issue when you assume that something should just work between environments with no issues. Environment is extremely important when developing. Just like a car chassis is not swappable with every type of car neither is the environment you create a program on.
But in the absence of actual log data, who knows what’s going on?
Agreed. Given what little has been presented from the log it points to attempts to load sqlite3 and use that over PostgreSQL. I wish I had the full log output to confirm. coughcough
We'll have to agree to disagree, then. I've got 4 or 5 deployments on
Heroku, and haven't seen any such environment-related problems.
And I'd suggest the whole point of a PaaS is to eliminate such things.
(The one issue I've had was related to db:push getting broken by an
update to the taps gem, now fixed.)