[Ironruby-core] no such file to load -- spec/story (LoadError)

Cory Foy cory.foy at gmail.com
Fri Nov 26 16:20:27 EST 2010


Hi Sundae,

generate is a ruby command in the script folder of a Rails app. Unless 
you are working in a Rails app, it won't be available.

If you *are* working in a Rails app, but on a Windows machine, then 
trying running "ir script/generate rspec". I think that's right. I know 
in Ruby it would be "ruby script/generate rspec". You are telling the 
interpreter to execute the file "generate" in the folder called "script" 
passing the argument "rspec" to it.

Have you installed rspec in your gems?

Cory

On 11/26/2010 2:15 PM, Sundae Oliseh wrote:
> I stumbled on this link...very similar to the problem I'm having
>
> http://old.nabble.com/New-setup-error.-no-such-file-to-load----spec-story-td23590218.html
>
> They suggest to run this: script/generate rspec
>
> how do I run it? When I paste it Ironruby command prompt I get the
> following message:
>
> 'script' is not recognized as an internal or external command,
> operable program or batch file.
>
> Anybody ?
>
>
> Sundae Oliseh wrote in post #963907:
>> Hi Guys,
>>
>> I'm trying to run the following script:
>>
>> require 'rubygems'
>> require 'spec/story'
>>
>> steps_for(:product_x) do
>>    Given("Product $productName at $price") do |productName, price|
>>     pending "Need to complete implementation for accessing C# object"
>>    end
>>    When("user requests a $amount user license") do |amount|
>>      pending "Need to complete implementation for accessing C# object"
>>    end
>>    When("this does not include support") do
>>      pending "Need to complete implementation for accessing C# object"
>>    end
>>    Then("the price should be $price") do |price|
>>      pending "Need to complete implementation for accessing C# object"
>>    end
>> end
>>
>> with_steps_for(:product_x) do
>>       run File.dirname(__FILE__) + "/pricing_scenarios_for_product_x"
>> end
>>
>>
>> And I get this error:
>>
>> C:/Program Files/IronRuby
>> 1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
>> 31:in `require': no such file to load -- spec/story (LoadError)
>>          from C:/Program Files/IronRuby
>> 1.0/lib/ruby/site_ruby/1.8/rubygems/custo
>> m_require.rb:31:in `require'
>>          from pricing_scenarios_for_product_x_story.rb:2
>>
>> Any ideas of what I'm doing wrong?
>>
>> Thanks for any attention.
>



More information about the Ironruby-core mailing list