Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find gem 'sqlite3 (>= 0) ruby'

I am learning Ruby on Rails and I followed the installation of RVM and Rails from Ryan Bigg's blog and the Agile Wed Development book. This has worked previously on my PC at home, but at work it gives me the error:

depot$ rails -v
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.

I am trying to generate a scaffold but this is what i get:

depot$ rails generate scaffold Product \ title:string description:text image_url:text price:decimal
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.

I have sqlite3 installed, RVM 1.9.2-p320, and running on Ubuntu 11.04.

Any ideas what can be causing this and how to fix it?

like image 442
Sun Wu-kong Avatar asked Jan 15 '23 00:01

Sun Wu-kong


2 Answers

Run

bundle install

in your Rails app's directory just like both error messages instruct you to.

like image 119
Andrew Marshall Avatar answered Jan 17 '23 15:01

Andrew Marshall


i had the same issue you could try to run sudo apt-get install libsqlite3-dev and bundle install in the app directory.

like image 27
BENS Avatar answered Jan 17 '23 14:01

BENS