我刚刚完成了tryruby.org教程,然后是rubyforzombies.org教程,一切都很顺利。 然后我开始使用我的Mac Os X 10.6终端安装Ruby 1.9.2和Rails 3.0.4,到目前为止还不错。
我已通过命令行创建了一个rails app,如下所示:
$ rails new ~/Sites/_ruby/rail3sqlite
$ cd rails3sqlite
$ rails server
正在成功生成文件夹和文件结构但是当我运行最后一行rails server
时,我只是收到错误消息:
Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources
listed in your Gemfile.
我怎样才能使这个工作?
在我看来,这方面的设置比学习语言更难。
无论哪种方式,如果有人可以帮我解决这个设置问题,那将是非常棒的。
到目前为止,我只使用MAMP在本地运行PHP(为我自动设置所有内容)所以我习惯使用MySQL而不是SQLite。
是否有理由选择其中一个?
是否有适用于SQlite的GUI工具,例如用于MySQL的PhpMyAdmin?
如何让rails使用MySQL? (我尝试将-d mysql
选项添加到rails new命令中,但后来我得到与mysql2
相同的错误,而不是sqlite3
。
谢谢, Jannis
更新
所以我按照下面的建议在我的$ bundle install
目录中运行ruby3sqlite
,并在控制台中返回:
Jannis:rail3sqlite Jannis$ bundle install
Fetching source index for http://rubygems.org/
/Users/Jannis/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:184:in `rescue in fetch_path': SocketError: getaddrinfo: nodename nor servname provided, or not known (http://rubygems.org/quick/Marshal.4.8/sqlite3-1.3.3.gemspec.rz) (Gem::RemoteFetcher::FetchError)
紧随其后的所有行:
from /Users/Jannis/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/remote_fetcher.rb:176:in `fetch_path'
from /Users/Jannis/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:111:in `fetch_spec'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/remote_specification.rb:47:in `_remote_specification'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/remote_specification.rb:53:in `method_missing'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:101:in `block in __dependencies'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:98:in `each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:98:in `__dependencies'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:68:in `activate_platform'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:325:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:215:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:344:in `block in resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:343:in `resolve_requirement'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:295:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `reverse_each'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:294:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:160:in `start'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:128:in `block in resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:127:in `catch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/resolver.rb:127:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/definition.rb:151:in `resolve'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/definition.rb:90:in `specs'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/definition.rb:85:in `resolve_remotely!'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/installer.rb:35:in `run'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/bundler-1.0.10/bin/bundle:13:in `<top (required)>'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/bin/bundle:19:in `load'
from /Users/Jannis/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/bin/bundle:19:in `<main>'
Jannis:rail3sqlite Jannis$ rails server
Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
如果您对这些线条意味着什么以及我需要做什么有任何想法,我将非常感谢您的帮助。
感谢您的建议到目前为止!非常感谢。
更新2:
所以看起来上面只是暂时的,也许宝石服务器出现故障或我的ISP出现了问题?谁知道......无论哪种方式我都运行bundle install
命令,现在一切正常。
感谢。
答案 0 :(得分:2)
在Rails 3中,项目所依赖的gem列在项目目录根目录的Gemfile
中。您需要运行bundle install
以(1)确保安装了应用程序依赖项,并且(2)生成Gemfile.lock
,以确定您的应用程序应该使用这些gems的确切版本。 (请注意,one命令会为您执行这两项操作。)
运行bundle install
后,您应该可以使用rails server
启动开发服务器。
[编辑]
您可以在the Bundler homepage详细了解Bundler,即管理Gemfile
的系统。
答案 1 :(得分:0)
确保cd rails3sqlite3
然后bundle install
。
答案 2 :(得分:0)
我在Snow Leopard 10.6上整理了一个Rails 3 / Ruby 1.9.2 / RVM的程序......然后把它扔到了一个网站上。看看,它可能有助于解决您的一些问题。
答案 3 :(得分:0)
对于Mac上的全新rails4(ruby 2)设置,请查看此博文:
我已经在自己的mac上尝试并测试过这种方法。我以为我会和社区分享。希望你会发现它很有用。