i have a problem with ruby. I tried a lot but nothing works for me.
When i want to start the rails server, i get this error message:
An error occurred while installing pg (0.18.1), and Bundler cannot continue.
Make sure that "gem install pg -v '0.18.1" succeeds before bundling.
This is what i tried already:
sudo install gem
bundle install
bundle install --path vendor/cache
gem install pg -v '0.18.1'
When i try gem install pg -v '0.18.1'
i get this error message:
Could not find gem 'pg (>= 0) ruby' in any of the gem sources listed in your Gemfile or installed on this machine.
Run bundle install
to install missing gems.
But bundle install
doesn't work either. I get this error message:
An error occurred while installing pg (0.18.1), and Bundler cannot continue.
Make sure that gem install pg -v '0.18.1'
succeeds before bundling.
I also tried to start the server in a new ruby project.
Nothing helps..
Thanks for your help!
These are my changes in my Gemfile:
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
end
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…