ruby datamapper will not load

こ雲淡風輕ζ 提交于 2019-12-03 14:32:48

You need to require 'data_mapper', not datamapper.

Note there is a datamapper gem as well as a data_mapper gem, but they are the same thing, just different names. You need use data_mapper as the library name in both of them.

As far as I can tell datamapper is a straight copy of data_mapper:

$ diff -r data_mapper-1.2.0/ datamapper-1.2.0/
diff -r data_mapper-1.2.0/Rakefile datamapper-1.2.0/Rakefile
21c21
< GEM_NAME         = 'data_mapper'
---
> GEM_NAME         = 'datamapper'

gem install datamapper in your terminal might help :) But you will also need a database and an adapter and you will want to use the gem somehow. Good luck and have fun with dm + sinatra!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!