开发者

Rails: Can't run DB Rake on OS X 10.6 because gem SQL lite cannot be found

开发者 https://www.devze.com 2023-03-11 21:56 出处:网络
Here\'s my error message when I do a DB rake: Could not find gem \'sqlite3 (>= 0)\' in any of the gem sources listed in your

Here's my error message when I do a DB rake:

Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.

I've tried Installing xCode 4.0.2

Commands:

sudo gem install sqlite3-ruby 
sudo gem update --system 
sudo gem update rails 
sudo gem update sqlite3-ruby

Gem list produces:

abstract (1.0.0)
actionmailer (3.0.8, 2.2.2)
actionpack (3.0.8, 2.2.2)
activemodel (3.0.8)
activerecord (3.0.8, 2.2.2)
activeresource (3.0.8, 2.2.2)
activesupport (3.0.8, 3.0.6, 2.2.2)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.14)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16开发者_C百科)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.8, 2.2.2)
railties (3.0.8)
rake (0.9.2, 0.8.3)
rubygems-update (1.8.5, 1.8.4, 1.3.1)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)

Any suggestions? I'm on Max OS X 10.6


I think it will work if you add sqlite to your Gemfile:

gem 'sqlite3'

And run:

$ bundle update


I solved this by doing:

sudo gem i sqlite3

If you check the man via:

gem help commands

The "i" stands for install, sort of a short cut. Doing this after running the bundle update & all the core updates cased Ruby's rake to work.

Thanks for your help!

0

精彩评论

暂无评论...
验证码 换一张
取 消