0

I am unable to run rails g or rails c, because of the following error message:

Could not find mysql2-0.3.18 in any of the sources
Run `bundle install` to install missing gems.

I can run 'rails server', which works fine, as expected. I also have ran bundle install, with no errors (this line is in my Gemfile: gem 'mysql2'). The database works fine with rails server, but seems to break with rails g/c.

Update:

I can run rails g and rails c with sudo. I think it's a problem with my path - I think I might have installed MySQL as root.

Community
  • 1
  • 1
Ben Aubin
  • 5,542
  • 2
  • 34
  • 54

1 Answers1

0

Have you tried running those commands using Bundler?

bundle exec rails c

bundle exec rails g
messanjah
  • 8,977
  • 4
  • 27
  • 40