Question

I'm trying to install the following ruby gem on my mac:

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

I get the following message:

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

Can someone more familiar with Ruby/IronRuby help me out?

Was it helpful?

Solution

It appears that I had missed an argument installing sinatra:

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...

I'm now experiencing issues with writing a "hello world" example using Sinatra. This is probably related to Shay's comment. Any other thoughts!?

OTHER TIPS

First thing - I'm not familiar with mono, but on Windows I would execute "igem sinatra" without ir before that. Maybe that's the problem?

Anyways, if you're having troubles installing the gem using igem, try MRI gem installer instead. After that you'll be able to use it via IronRuby with a tiny tweak.

On your ruby file add the next line: $LOAD_PATH << path_to_mri_gems_folder where path_to_mri_gems_folder would be the full path to the MRI gems folder. After this line require sinatra.

There is also a patch of the IronRuby team for Sinatra, I'm not sure if it's still needed: http://www.ironruby.net/Documentation/Real_Ruby_Applications/Sinatra

Shay.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top