无法在任何来源中找到builder-2.1.2

时间:2011-01-16 15:36:32

标签: ruby-on-rails bundle builder

我正在关注Getting Started with Rails指南,但我遇到了一个问题:

bash-4.1$ bundle install
Using rake (0.8.7) 
Using abstract (1.0.0) 
Using activesupport (3.0.3) 
Using builder (2.1.2) 
Using i18n (0.5.0) 
Using activemodel (3.0.3) 
Using erubis (2.6.6) 
Using rack (1.2.1) 
Using rack-mount (0.6.13) 
Using rack-test (0.5.7) 
Using tzinfo (0.3.24) 
Using actionpack (3.0.3) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.9) 
Using mail (2.2.14) 
Using actionmailer (3.0.3) 
Using arel (2.0.7) 
Using activerecord (3.0.3) 
Using activeresource (3.0.3) 
Using bundler (1.0.7) 
Using thor (0.14.6) 
Using railties (3.0.3) 
Using rails (3.0.3) 
Using sqlite3-ruby (1.3.2) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
bash-4.1$ rake db:create
(in /Users/user/Documents/blog)
Could not find builder-2.1.2 in any of the sources
Try running `bundle install`.
bash-4.1$ bundle show builder
/Users/user/.gem/ruby/1.8/gems/builder-2.1.2

我也尝试将Builder安装为RubyGem,但这并没有改变一件事。

3 个答案:

答案 0 :(得分:3)

尝试通过bundle exec运行它,以确保Gemfile中指定的所有gem都以正确的版本提供:bundle exec rake db:create

答案 1 :(得分:0)

您可以验证已安装的gem是否可见,如下所示:

bundle show builder

/usr/lib/ruby/gems/1.8/gems/builder-2.1.2

我遇到同样的问题,bundle exec rake仍然无法看到已安装的宝石。

答案 2 :(得分:0)

我的rake版本(安装在/ usr / bin / rake)指向旧版本的Ruby 1.8。

修改rake的第一行以指向正确版本的Ruby。您还可以清除'供应商下的捆绑缓存。目录或将bundle移动到另一个本地目录:

  

捆绑安装 - 路径宝石

在命令行中,找到您的默认' ruby​​'和' rake'命令并检查Ruby的版本:

  

哪个红宝石

     

哪个rake

     

ruby​​ -v

在/ usr / bin / rake(第1行):

  

#!/选择/ local / bin目录/红宝石

相关问题