我尝试rails生成mongoid时出现以下错误:config无法找到生成器mongoid:config.如果我指定gem'mongoid','3.1.4',它会给我以下内容:
Bundler找不到gem"activemodel"的兼容版本:在Gemfile中:mongoid(= 3.1.4)x86-mingw32依赖于activemodel(〜> 3.2)x86-mingw32
Run Code Online (Sandbox Code Playgroud)rails (= 4.0.0.rc2) x86-mingw32 depends on activemodel (4.0.0.rc2)
请帮忙.谢谢!
GemFile:gem'rail','4.0.0.rc2'
gem 'mongoid'
gem 'mongoid-paperclip'
gem 'bson_ext'
Run Code Online (Sandbox Code Playgroud)
Gemfile.lock的
GEM
specs:
actionmailer (4.0.0.rc2)
actionpack (= 4.0.0.rc2)
mail (~> 2.5.3)
actionpack (4.0.0.rc2)
activesupport (= 4.0.0.rc2)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.0.rc2)
activesupport (= 4.0.0.rc2)
builder (~> 3.1.0)
activerecord (4.0.0.rc2)
activemodel (= 4.0.0.rc2)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0.rc2)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0.rc2)
i18n (~> 0.6, >= 0.6.4)
minitest …Run Code Online (Sandbox Code Playgroud) 我是编程和Ruby on Rails的新手.所以,我刚刚创建了一个新的rails项目,我想将数据插入数据库.我正在使用sqlite3,我在Windows中工作.我创建了一个包含属性的表产品:名称,描述和价格.我想为每个属性指定数据,例如name:Shoes等.如何使用命令行将数据插入数据库?我搜索了我的问题,但我没有找到明确的答案.任何人都可以帮助我或给我一个有用信息的链接吗?
谢谢!