2012-01-13 128 views
0

我正在學習使用Sinatra + Datamapper來構建一個輕量級Web應用程序。在Win7上安裝失敗的DataMapper Gem

我跑gem install sqlite3 datamapper dm-sqlite-adapter,它似乎已經成功地安裝...

然後我試圖執行與開始我的.rb文件:

require 'sinatra' 
require 'datamapper' 

,我得到了一個錯誤,現在還不能找到datamapper文件。

C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- datamapper (LoadError) 

我也試圖與要求「data_mapper」因爲是在internetz衝突信息,以創業板的正確拼寫,但是同樣的結果。

然後,我列出了所有已安裝的寶石(請參見下文),並確定沒有像datamapper或data_mapper這樣的gem。我讀過,所以這是一個元寶石,我猜這意味着它實際上並沒有安裝那個寶石,而是所有的寶石都以dm開頭 - ?

作爲最後一招我試過gem install data_mapper

和我的惡運:

C:\Users\Manu\Sinatra>gem install data_mapper 
Building native extensions. This could take a while... 
ERROR: Error installing data_mapper: 
ERROR: Failed to build gem native extension. 
C:/Ruby192/bin/ruby.exe extconf.rb 
creating Makefile 
make 
'make' is not recognized as an internal or external command,operable program or batch file. 


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.6.4 for inspection. 
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/json-1.6.4/ext/json/ext/parser/gem_make.out 

我找遍了,只是找不到任何東西來幫助我解決這個,所以希望有一個人用魔杖和尖尖的帽子漫遊這個論壇!

非常感謝 PS:我正在與安裝程序安裝紅寶石1.9.2p0

*當地的寶石*

abstract (1.0.0) 
actionmailer (3.0.3) 
actionpack (3.0.3) 
activemodel (3.0.3) 
activerecord (3.0.3) 
activeresource (3.0.3) 
activesupport (3.0.3) 
addressable (2.2.6) 
arel (2.0.6) 
backports (2.3.0) 
builder (2.1.2) 
bundler (1.0.7) 
cgi_multipart_eof_fix (2.5.0) 
data_objects (0.10.7) 
diff-lcs (1.1.3) 
dm-aggregates (1.2.0) 
dm-constraints (1.2.0) 
dm-core (1.2.0) 
dm-do-adapter (1.2.0) 
dm-migrations (1.2.0) 
dm-sqlite-adapter (1.2.0) 
dm-transactions (1.2.0) 
do_sqlite3 (0.10.7 x86-mingw32) 
erubis (2.6.6) 
fastercsv (1.5.4) 
gem_plugin (0.2.3) 
growl (1.0.3) 
i18n (0.5.0) 
json_pure (1.6.4) 
mail (2.2.12) 
mime-types (1.16) 
minitest (1.6.0) 
mongrel (1.1.5 x86-mingw32) 
multi_json (1.0.4) 
polyglot (0.3.1) 
rack (1.4.0, 1.2.1) 
rack-mount (0.6.13) 
rack-protection (1.2.0) 
rack-test (0.5.6) 
rails (3.0.3) 
railties (3.0.3) 
rake (0.8.7) 
rdoc (2.5.8) 
rspec (2.8.0) 
rspec-core (2.8.0) 
rspec-expectations (2.8.0) 
rspec-mocks (2.8.0) 
rubygems-update (1.8.15) 
sinatra (1.3.2) 
sqlite3 (1.3.5 x86-mingw32) 
sqlite3-ruby (1.3.3, 1.3.2 x86-mingw32) 
sys-uname (0.9.0 x86-mingw32) 
thor (0.14.6) 
tilt (1.3.3) 
treetop (1.4.9) 
trollop (1.16.2) 
tzinfo (0.3.23) 
yard (0.7.4) 
+0

最終發現我對OSX10.4,我做了一個乾淨的安裝10.5,一切都開始像一個魅力的工作運行,所以許多問題。我有一個非常老的mac,因此不會升級到> 10.5,因爲它會陷入停滯狀態。 – supamanu 2012-08-21 07:45:42

回答