使用 DataMapper 和 MySQL 数据库设置 Padrino
您好,我正在尝试在 Mac OSX Snow Leopard 上使用 DataMapper 和 MySQL 设置 Padrino 项目。
我有必要的宝石: dm核心 数据对象 do_mysql 但正如我所说,
但是当我尝试从控制台使用 PADRINO START 启动 padrino 时,我收到以下错误:
/Users/ivolution/.bundle/ruby/1.9.1/gems/dm-core-0.10.2/lib/dm-core/adapters/mysql_adapter.rb:3:in `require': no such file to load -- do_mysql (LoadError)
我确实安装了 do_mysql gem,所以不应该出现这样的错误,在尝试启动 Padrino 之前,我在项目文件夹中进行了bundle install
。
有什么想法吗?
Hello I am trying to setup a Padrino project using DataMapper and MySQL on my Mac OSX Snow Leopard.
I have the necessary gems:
dm-core
data_objects
do_mysql
mysql (linked to my original Mac OSX installation)
But when I try to start the padrino with PADRINO START from the console, I get the following error:
/Users/ivolution/.bundle/ruby/1.9.1/gems/dm-core-0.10.2/lib/dm-core/adapters/mysql_adapter.rb:3:in `require': no such file to load -- do_mysql (LoadError)
But as I said I do have do_mysql gem installed so there shouldn't be such error, I did bundle install
in my project folder before trying to start Padrino.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
关键可能在 Gemfile 中。它与安装的内容无关,而是与捆绑程序 Gemfile 中声明的内容有关。进入 ./Gemfile 并声明需要 do_mysql gem,它可能会解决问题。
像这样的东西:
gem 'do_mysql'
应该可以解决问题The key is probably in the Gemfile. It is not about what is installed but instead what is declared in your bundler Gemfile. Go into ./Gemfile and declare the do_mysql gem required and it will probably solve the issue.
Something like:
gem 'do_mysql'
should do the trick