1

I am using pg for dev and test in local machine only

its in dev and test group out in gemfile

group :development, :test do
  gem 'pg'
end

rails version is

Rails 3.0.19 ruby 1.8.7

I used moonshine or shorter cut of capistrano

capistrano:deploy 

the migrations file can't be migrated using capistrano, throws an error.

I am trying to run migrations manually inside server

bundle exec rake db:migrate VERSION=20140205173759_add_hebrew_to_piles.rb

I have three files and wanted to run rake migrate on each one (got it from stackoverlow, rails run specific migration)

and got

no such file to load -- pg

I am using mysql as production database so I don't understand why is looking for pg inside my server? any help?

Community
  • 1
  • 1
Jngai1297
  • 2,415
  • 5
  • 29
  • 63
  • 1
    It's generally a bad idea to run one kind of database locally and another kind in production. This is a great example of why. You should consider running mysql locally or postgres on production to avoid these kinds of issues. – Tyler Feb 05 '14 at 23:15
  • @tyler I understand but the mysql production db has already been created, and I am more familiar with pg so I tested it locally any way you can just add RAILS_ENV=production when you run the rake db:migrate – Jngai1297 Feb 05 '14 at 23:17
  • 3
    If you're stuck running mysql in production, you might consider learning and developing with mysql as a best practice. As for "you can just add RAILS_ENV=production when you run the rake db:migrate": if it was that straightforward and problem-free, you wouldn't have to ask the question above, would you? – Tyler Feb 05 '14 at 23:19

0 Answers0