Published by Fabian on 11 Apr 2008 at 11:27 am
Rubies are girls best friends?
I resisted for a long time, but there is a talk coming up in the Düsseldorf Java User Group about JRuby, so I really want to get to know what this Ruby thing is all about. Up to now I thought that PHP is good enough to be complement for Java for low scale projects and prototype, but however, we need software that is able to be integrated. I was not so successfully getting a Java<->PHP Integration running, so perhaps this can be done with Ruby?
Let me quickly take you along with my Getting Started experience:
- Google for “Ruby on Rails getting started”
- From
http://wiki.rubyonrails.org/rails/pages/GettingStartedWithRails
got to
http://wiki.rubyonrails.com/rails/pages/RailsOnWindows
A bit lost there but found a nice installer on
http://bitnami.org/stack/rubystack
- Install the stack, wait for 30 Minutes until Ruby has extracted thousands of yaml files.
- The stack pretended to have a demo application ready on port 3000, but this was not configured.
Also the Ruby on Rails wiki pages were not very helpful on how to finalize this last setup step.
I found a README in the application directory. That one told me to invoke script/server…
Well.. I tried. Windows said: command or file not found.
The file itself has:
#!/usr/bin/env ruby
How is that supposed to work on Windows?
Even creating an new project with “rails” command which was found in path correctly does produce unix shell scripts…
Ah!http://wiki.rubyonrails.com/rails/pages/ShebangChangeScripts
ruby -i.bak -pe 'gsub!("#!/usr/local/bin/ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*and now? The command did not succeed, even after fixing the permission errors, because the script tries to modify folders and the path being incorrect, its still a unix shell script.. not a windows command script. Though not working.
- okay, I was bold and tried invoking “ruby script/server” and surprise that did work! And even the application was running.
90 Minutes for getting the welcome screen of a ruby app under windows. not very impressive. Lets hope application development is more convenient.
Lets see how my Ruby experiments will go on. I better open a new category for it.
Manuel on 11 Apr 2008 at 4:39 pm #
Hi,
I’m Manuel from the BitNami team. First of all thanks for trying our project. I read your post and I want to make a question and a couple of clarifications about the problems you found when trying RubyStack:
* “The stack pretended to have a demo application ready on port 3000, but this was not configured.”
The application is supposed to be already configured. When you pointed your browser to http://localhost:3000/ and clicked “About your application’s environment” what error messaged did you get? It should show a yellow box with the right information inside.
* “I found a README in the application directory. That one told me to invoke script/server…
Well.. I tried. Windows said: command or file not found.”
That README comes from Rails and not BitNami. Directions about how to use RubyStack can be found on the “Quick Start Guide”, a rubystack.pdf accessible also through the start menu. There we explain that the server should be launched invoking “ruby script/server”.
* “The file itself has: #!/usr/bin/env ruby”
Shebang is not rewritten by RubyStack, instead of that we suggest the user to invoke Ruby scripts preceded with “ruby”. It would be a nice feature to implement for a future version.
Hope this helps to clarify some aspects of RubyStack and help us to build a better project.
Fabian on 11 Apr 2008 at 5:03 pm #
wow, I am impressed. I tried not to be found, so I avoided hotlinking
But thank you very much for trying to help me.
The page did not open, because the mongrel server was not running. I got the impression that BitNami should have launched it.
Exactly that server I needed to fire up using “ruby script\server”
I did not say BitNami was guilty of having those Unix scripts. I had hoped that I would get windows scripts on a windows machine. Either by BitNami or ruby itself.
As I did not read the pdf (:-)) I haven’t found your recommendation to launch commands with “ruby”.
So actually my only complain would be that ruby should be more Windows friendly.
Ah and as you are here. I would have liked the option to not install subversion. I have already one.
The positive side, I also should mention is that the installation was better than the XAMPP I installed recently, which was driving me crazy because it altered file permissions.