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?
Run
bundle install
in your Rails app's directory just like both error messages instruct you to.
i had the same issue you could try to run sudo apt-get install libsqlite3-dev
and bundle install
in the app directory.
You need to run it from your app directory so it can find the Gemfile to know wich gems it needs to install.
ya.. i was also having the same problem
when we start with rails then while writing "rails new " we get this problem of sqlite3 . This appears due to the reason that we haven't wrote "bundle install" and install bundle. and when we try to write "bundle install" then it will show some gymfile missing error. This happens due to the reason that we haven't changed the directory to that folder where we are using the rails application. So for solving this problem follow these steps :
- write "rails new app" // instead of app you can write any name you want.
- now a folder named app will be created in your home.
- now start new terminal.
- write "cd app"
- now you can continue your work, and you will not face any such problem.