[英]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.我正在尝试在 rails 上开始使用 ruby,每当我尝试使用 rails server 命令启动服务器时,我都会收到 sqlite3 not found 错误。 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
.查看
gem list
的 output 。 If the sqlite gem is not in there then you need to install it.如果sqlite gem 不在那里,那么您需要安装它。
For Rails 3 you need to add the following in your Gemfile
:对于 Rails 3,您需要在
Gemfile
中添加以下内容:
gem 'sqlite'
... then run: ...然后运行:
bundle install
For Rails 2 run:对于 Rails 2 运行:
gem install sqlite
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.