0

我不知道我在 OSX Mountain Lion 下安装 ruby​​ / rails 发生了什么。

我从一个黑色的 rails 应用程序开始,运行 bundle 并列出已安装的 bundle,bundle show我得到了这个:

[..]
* sqlite3 (1.3.7)
* thor (0.17.0)
* tilt (1.3.3)
* treetop (1.4.12)
[..]

一旦我运行 rake db:migrate 我得到以下错误:

Could not find thor-0.17.0 in any of the sources
Run `bundle install` to install missing gems.

但是,如图所示,安装了 thor-0.17。如果我强迫它:

sudo gem install --version 0.17 thor 
Successfully installed thor-0.17.0
1 gem installed
Installing ri documentation for thor-0.17.0...
Installing RDoc documentation for thor-0.17.0...

并再次运行迁移,我一直有依赖错误(在这种情况下“在任何源中都找不到 formtastic-2.2.1”)对于捆绑包说已经安装的 gem。有什么帮助吗?谢谢

编辑

4

1 回答 1

0

因此,使用您的 Gemfile 后,我收到以下错误:

Bundler 找不到 gem "railties" 的兼容版本:在 Gemfile 中:rails (= 3.2.8) ruby​​ 依赖于 railties (= 3.2.8) ruby

sass-rails (~> 3.2.3) ruby depends on
  railties (3.2.11)

Bundler 找不到 gem "actionpack" 的兼容版本:在快照中 (Gemfile.lock): actionpack (3.2.11)

在 Gemfile 中:meta_search (>= 1.1.0.pre) ruby​​ 依赖于 actionpack (~> 3.1.0.alpha) ruby

运行bundle update将只使用 Gemfile 中的 gem 从头开始​​重建快照,这可能会解决冲突。

使用 3.2.11 版本的 rails 修复了捆绑包。

无论如何,Rails 3.2.11 修复了一个巨大的安全威胁,所以更新吧!

于 2013-01-29T10:18:53.283 回答