sqlite3 installed location for ruby on rails
I am trying to get started with ruby on rails and whenever I try to start the server using rails server command I get the sqlite3 not found error. I tried the following开发者_高级运维:
which sqlite3
And I got the following:
/opt/local/bin/sqlite3
I am thinking that should it not be
/usr/local/bin/sqlite3
Why is it installed incorrectly on my machine? How can I fix it?
Check the output of gem list
. If the sqlite gem is not in there then you need to install it.
For Rails 3 you need to add the following in your Gemfile
:
gem 'sqlite'
... then run:
bundle install
For Rails 2 run:
gem install sqlite
精彩评论