2009-08-02 107 views
3

我想我的Mac上安裝以下紅寶石寶石:Sinatra可以與IronRuby一起使用嗎?

http://www.sinatrarb.com/intro.html

我得到以下信息:

michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem sinatra 
    ERROR: While executing gem ... (RuntimeError) 
     Unknown command sinatra 
    michael-rosarios-macbook:bin michaelrosario1$ 

人比較熟悉的Ruby/IronRuby的能幫助我嗎?

+1

Sinatra只能使用,如果你這樣做我的方式;-) – 2009-08-02 03:51:04

+1

也許如果你包括老鼠包(年齡)... brrmbump。 – NomeN 2009-08-02 04:26:08

回答

1

看來,我錯過了一個參數安裝西納特拉:

michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem install sinatra 
Successfully installed rack-1.0.0 
Successfully installed sinatra-0.9.4 
2 gems installed 
Installing ri documentation for rack-1.0.0... 
Installing ri documentation for sinatra-0.9.4... 
Installing RDoc documentation for rack-1.0.0... 
Installing RDoc documentation for sinatra-0.9.4... 

我現在遇到的問題是使用末日編寫的「Hello World」的例子。這可能與Shay的評論有關。任何其他的想法!?

0

首先 - 我不熟悉單聲道,但在Windows上,我會在沒有ir之前執行「igem sinatra」。也許這就是問題所在?

不管怎樣,如果您遇到麻煩,請使用igem安裝gem,請嘗試使用MRI gem安裝程序。 之後,您將可以通過IronRuby進行微調。

在你的Ruby文件中添加下一行: $ LOAD_PATH < < path_to_mri_gems_folder 其中path_to_mri_gems_folder是將MRI寶石夾的完整路徑。 在此行後需要sinatra。

還有IronRuby團隊爲西納特拉的補丁,我不知道它是否還需要: http://www.ironruby.net/Documentation/Real_Ruby_Applications/Sinatra

吉文。

相關問題