我是使用Ruby on Rails的新手。我正在尝试运行rails server命令并不断出现此错误:
Toran1$ pwd
/Users/Toran1/Sites/simple_cms
Toran1$ rails server
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.2.gemspec:11.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.2.gemspec:11.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.2.gemspec:11.
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2.rb:8
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.13/lib/bundler.rb:120:in `require'
from /Users/Toran1/Sites/simple_cms/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:28:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:28
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6
我已经重新安装了所有的宝石,这是我的gemlist:
Toran1$ gem list
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.2.gemspec:11.
*** LOCAL GEMS ***
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Library/Ruby/Gems/1.8/specifications/rubygems-update-1.8.2.gemspec:11.
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
activeresource (3.0.7)
activesupport (3.0.7)
arel (2.0.9)
builder (2.1.2)
bundler (1.0.13)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.3)
erubis (2.6.6)
fastthread (1.0.7)
gem_plugin (0.2.3)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
mongrel (1.1.5)
mysql2 (0.3.2)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.7)
railties (3.0.7)
rake (0.8.7)
rubygems-update (1.8.2)
rvm (1.6.9)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
如果有经验丰富的人可以指出我正确的方向,我会非常感激。我已经在这个安装工作了好几天了!
由于
答案 0 :(得分:1)
愚蠢的问题但是:你已经安装了mysql gem,但是你实际安装了mysql应用程序了吗?
mysql gem只是与您必须在系统上安装的现有应用程序对话的一些代码。