Rails server error on Rails 3, sqlite3 on development not working
I have a rails test app set up, I want to just first get a page to show in the browser to see if I've gotten all the dependencies working.
I started the installation process on ubuntu from scratch, installed ruby, rails, sqlite3, mysql, and all the gem required as well. I'm using rails 3.0.7 and my app was created using
$ rails new test_app
And I wanted to run the server so I entered
$ rails server
Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.
I used
$ bundle install
to ma开发者_开发问答ke sure after I googled it but nothing happened after this. any ideas on what's going on? Maybe I missed a step? Comment for any other details required.
Edit: here's the gemfile pastebin: http://pastebin.com/78dsGzVx I also ran bundle install after uncommenting the following:
gem 'sqlite3-ruby', :require => 'sqlite3'
You have to add gem "sqlite3"
to the Gemfile and then run bundle install
There is written Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.
It means you should add:
gem 'sqlite3'
to your Gemfile
and then run bundle
again.
Also it can be useful, if you haven't got sqlite installed:
sudo apt-get install sqlite3 libsqlite3-dev
Include this in your Gemfile.
gem 'sqlite3-ruby', :require => 'sqlite3'
Also make sure to run:
sudo apt-get install libsqlite3-dev sqlite3
精彩评论