开发者

Running Ruby Koans in Netbeans 6.9.1

I'm very new to Ruby, and currently running through the Ruby Koans to get a better feel for the language. My IDE开发者_StackOverflow社区 is NetBeans 6.9.1.

I have created a new Ruby project from existing source, and pointed it to where I installed my Ruby Koan files (C:\rubykoans\koans)

I can successfully run the Koans from the command prompt with the command:

ruby path_to_enlightenment.rb

I have set my project properties in NetBeans to have the following parameters:

Main Script:  path_to_enlightenment.rb
Working Directory:  C:\rubykoans\koans
(All other options are blank)

When I attempt to run the application, I receive the following error:

path_to_enlightenment.rb class wasn't found in RubyProject1 project.

Below this is a dialog to select the main script, which just says

<No Ruby files found>

My goal is to be able to run the koans from NetBeans, and look at the output window vs. having to work on the projects in NetBeans, and keep a separate command window open and run the project from there.

Any assistance would be greatly appreciated!


I have it running. I set the main script to

path_to_enlightenment.rb

I also took the Koans and created an project from existing sources. I had to do nothing else and it ran.


Congrats, koans would be a nice way to learn the ins and outs of the language.

the path_to_enlightenment.rb file is just a list of require statements (at least when I cloned the project). NetBeans is probably doing some weird IDE stuff assuming a class with the same name as your project. you could try running the rake task as suggested to do in the README file (last I looked there was a menu option somewhere to run rake tasks within the selected project, maybe a right click on the project folder..?), or put this under all the require statements

class RubyProject1
end

opinion: In keeping with enlightenment, ruby culture, and simplicity (aims of the project), you don't need much more than a terminal and vim or notepad++ to work with the koans project. NetBeans may end up being more of a burden than a help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜