我在ROR和MongoDB新手,但有Linux的, 公允知識,同時我試圖建立的MongoDB在我的Ruby on Rails的,我這個指南:建立Ruby on Rails和MongoDB的在Ubuntu 11.04
,當我在 「運行測試」,我跑的命令:
rake test
我得到這個錯誤:
rake aborted!
You have already activated bson 1.4.0, but your Gemfile requires bson 1.3.1. Using bundle exec may solve this.
(See full trace by running task with --trace)
我試圖在互聯網上搜索類似的問題,我能得到最好的是這樣的:
Error: You have already activated bson 1.3.1, but your Gemfile requires bson 1.2.4.
我試圖按照它的兩個方法卸載BSON版本1.4.0它給:
rake aborted!
Could not find bson (= 1.4.0) amongst [actionmailer-3.1.1, actionpack-3.1.1, activemodel-3.1.1, activerecord-3.1.1, activeresource-3.1.1, activesupport-3.1.1, arel-2.2.1, bson-1.3.1, bson_ext-1.4.0, bson_ext-1.3.1, builder-3.0.0, bundler-1.0.21, coffee-rails-3.1.1, coffee-script-2.2.0, coffee-script-source-1.1.2, erubis-2.7.0, execjs-1.2.9, hike-1.2.1, i18n-0.6.0, jquery-rails-1.0.16, json-1.6.1, mail-2.3.0, mime-types-1.17.2, mime-types-1.16, mongo-1.4.0, mongo-1.3.1, mongo_mapper-0.10.0, mongoid-2.3.3, multi_json-1.0.3, plucky-0.3.8, polyglot-0.3.3, polyglot-0.3.2, rack-1.3.5, rack-cache-1.1, rack-mount-0.8.3, rack-ssl-1.3.2, rack-test-0.6.1, rails-3.1.1, railties-3.1.1, rake-0.9.2.2, rake-0.9.2, rdoc-3.11, sass-3.1.10, sass-rails-3.1.4, sprockets-2.0.3, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, tzinfo-0.3.30, uglifier-1.0.4]
(See full trace by running task with --trace)
我試圖這些線在配置/ environment.rb文件的起始附加:
require 'yaml'
YAML::ENGINE.yamler= 'syck'
但它沒用。
我已經gem1.8和gem1.9.1安裝
gem1.8 list
回報:
*** LOCAL GEMS ***
actionmailer (3.1.1)
actionpack (3.1.1)
activemodel (3.1.1)
activerecord (3.1.1)
activeresource (3.1.1)
activesupport (3.1.1)
arel (2.2.1)
bson (1.4.0, 1.3.1)
bson_ext (1.4.0, 1.3.1)
builder (3.0.0)
bundler (1.0.21)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.1.2)
erubis (2.7.0)
execjs (1.2.9)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.16)
json (1.6.1)
mail (2.3.0)
mime-types (1.17.2, 1.16)
mongo (1.4.0, 1.3.1)
mongo_mapper (0.10.0)
mongoid (2.3.3)
multi_json (1.0.3)
plucky (0.3.8)
polyglot (0.3.3, 0.3.2)
rack (1.3.5)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.1)
railties (3.1.1)
rake (0.9.2.2, 0.9.2)
rdoc (3.11)
sass (3.1.10)
sass-rails (3.1.4)
sprockets (2.0.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.30)
uglifier (1.0.4)
我做:
gem1.8 install mongoid
gem1.8 install mongo_mapper
gem1.8 install mongo
gem1.8 install bson
gem1.8 install bson_ext
請告訴我,我應該如何着手?
是通過rubygems或apt-get安裝的rails嗎? –
通過寶石安裝導軌 – d34th4ck3r