在Mac上:“rails generate model User”失败 - 用于mysql数据库项目

时间:2011-11-28 06:45:17

标签: mysql ruby-on-rails model

我刚在Mac OS 10.6上安装了Rails,并使用以下方法创建了一个rails项目 命令: - rails new simple_cms -d mysql

然后我跑了:

- 捆绑安装

这安装了mysql2和其他几个宝石

已经安装了mysql数据库软件。

第一个模型生成命令由于某种原因失败了 - 任何想法?

- rails生成模型用户

/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/mysql2-0.3.10/lib/mysql2.rb:9:in require': dlopen(/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/mysql2-0.3.10/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError) Referenced from: /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/mysql2-0.3.10/lib/mysql2/mysql2.bundle Reason: image not found - /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/mysql2-0.3.10/lib/mysql2/mysql2.bundle from /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/mysql2-0.3.10/lib/mysql2.rb:9:in'     来自/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in require' from /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in块(2级) in require'     来自/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in each' from /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in阻止在'需要'     来自/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in each' from /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in require'     来自/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/bundler-1.0.21/lib/bundler.rb:122:in require' from /Home-Lite/RubyProjects/simple_cms/config/application.rb:7:in'     来自/Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/railties-3.1.1/lib/rails/commands.rb:21:in require' from /Users/anilo/.rvm/gems/ruby-1.9.2-p290@rails3/gems/railties-3.1.1/lib/rails/commands.rb:21:in'     来自script / rails:6:require' from script/rails:6:in'

这是我机器上的宝石。

---宝石清单

*本地宝石*

摘要(1.0.0) actionmailer(3.1.1,3.0.0) actionpack(3.1.1,3.0.0) activemodel(3.1.1,3.0.0) activerecord(3.1.1,3.0.0) activeresource(3.1.1,3.0.0) activesupport(3.1.1,3.0.0) ansi(1.4.1) arel(2.2.1,1.0.1) 建设者(3.0.0,2.1.2) 捆绑(1.0.21) 咖啡栏(3.1.1) 咖啡脚本(2.2.0) coffee-script-source(1.1.3) erubis(2.7.0,2.6.6) execjs(1.2.9) 徒步旅行(1.2.1) i18n(0.6.0,0.4.2) jquery-rails(1.0.19) json(1.6.1) 邮件(2.3.0,2.2.19) 哑剧型(1.17.2) multi_json(1.0.3) mysql2(0.3.10) 多语言(0.3.3) 机架(1.3.5,1.2.4) rack-cache(1.1) 机架式(0.8.3,0.6.14) rack-ssl(1.3.2) 机架测试(0.6.1,0.5.7) 铁轨(3.1.1) 铁路(3.1.1,3.0.0) 耙子(0.9.2.2) rdoc(3.11) 萨斯(3.1.10) sass-rails(3.1.5) 链轮(2.0.3) sqlite3(1.3.4) 托尔(0.14.6) 倾斜(1.3.3) 树梢(1.4.10) 转(0.8.3) tzinfo(0.3.31) uglifier(1.1.0)

0 个答案:

没有答案