0

I have been able to run the server for my rails app, until today when I entered 'rails s', it gave this error:

    Bundler could not find compatible versions for gem "bcrypt-ruby":
  In snapshot (Gemfile.lock):
    bcrypt-ruby (3.1.5)

  In Gemfile:
    sorcery (>= 0) ruby depends on
      bcrypt-ruby (>= 3.0) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

I ran 'bundle update' and it gave me yet another error

 An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before bundling.

I then decided to install rails through typing the following command

gem install rails --no-ri --no-rdoc

Everything ran smoothly, but once I ran 'rails --version' to verify, the terminal gave me this error:

    Bundler could not find compatible versions for gem "bcrypt-ruby":
  In snapshot (Gemfile.lock):
    bcrypt-ruby (3.1.5)

  In Gemfile:
    sorcery (>= 0) ruby depends on
      bcrypt-ruby (>= 3.0) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

I don't understand what I'm doing wrong.

Eyeslandic
  • 14,553
  • 13
  • 41
  • 54
cs-nerd
  • 73
  • 7
  • Did you try installing the pg gem `gem install pg -v '0.17.1'` ? – Eyeslandic Jul 17 '14 at 02:54
  • Yes, I did. I got this error: Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. – cs-nerd Jul 17 '14 at 12:46
  • If you're on debian/ubuntu try running `sudo apt-get install libpq-dev`, that solved it for me once. – Eyeslandic Jul 17 '14 at 16:58
  • If that doesn't do the trick there are some suggestions here http://stackoverflow.com/questions/4827092/unable-to-install-pg-gem – Eyeslandic Jul 17 '14 at 17:00

0 Answers0