我正在尝试按照教程启动并运行,但大约 2 年前我曾尝试使用 Hartl 书但没有成功,所以现在我安装了所有这些不同的东西,我不知道它们在哪里,它们是什么,或者如何摆脱他们。我什至不记得我安装的所有东西。我在 OSX 10.6.8
教程说rails new issues
我这样做了,它说我应该看到一堆东西被创建,然后是一个捆绑器。没看到打包机 我在另一个 SO 帖子上找到了一些说明,并按照它们得到了这个错误:
xxxx-xxxx-macbook-pro:issues Ryan$ bundle install
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.3.5)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
现在,如果我这样做,rails -v
我会得到:
/Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/resolver.rb:130:in `block in resolve': Bundler could not find compatible versions for gem "bundler": (Bundler::VersionConflict)
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.3.5)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
from /Users/Ryan/.rvm/gems/ruby-1.9.2-p318@rails3tutorial/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from /Library/firstapp/issues/config/boot.rb:8:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from script/rails:5:in `<main>'
另一个 SO 主题说,看看我是否必须安装捆绑器:
xxxxx-xxxx-macbook-pro:issues Ryan$ gem list bundler
*** LOCAL GEMS ***
bundler (1.3.5, 1.0.22)
那么既然 1.0.22 说它正在被使用,我删除了 1.3.5
xxxx-xxxx-macbook-pro:issues Ryan$ gem uninstall bundler -v 1.3.5
Successfully uninstalled bundler-1.3.5
无论我是否更新此内容,我都会遇到错误。
我迷路了。我认为 rails3tutorial 来自一年多前,当时我尝试了 Hartl 书,而 firstapp 是我试图放置我现在正在尝试的教程的地方。如果有人有任何线索,我真的很想弄清楚这一点。也许有一天我什至可以通过设置并在 Ruby On Rails 上做一些富有成效的事情。