Reputation: 36
I have a problem with RoR + Heroku : Console log:
C:\Users\Admin\RoR\demo_app>heroku run rake db:migrate
Running rake db:migrate attached to terminal... up, run.1
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adap
ter` (pg is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.1'
gem 'sqlite3', '1.3.3'
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
group :production do
gem 'pg'
end
group :development, :test do
gem "sqlite3-ruby", :require => "sqlite3"
end
I read need fix database.uml "postgres" -> "postgresql", but i'm not find this cod :( database.uml :
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
And I install pg, Gemfile.log:
pg (0.11.0-x86-mingw32)
I don't know what me doing :( P.S. sorry, my English is not good, I'm from Russia( З.Ы. Может кто по русски ответит, буду очень признателен)(
Upvotes: 1
Views: 252
Reputation: 2289
Just change the gem 'sqlite3' to gem 'pg' in the gem file.
Then bundle install and then go in a sequential manner as shown here.
First you have to deploy your app onto heroku then omnly you can migrate your data to the app.
Upvotes: 2