I am warming up to Ruby. However, I am not overly keen on Rails as for right now, but mabye in the future.
How could I setup Ruby (only) test setup where I could run some web stuff written in Ruby?
Printable View
I am warming up to Ruby. However, I am not overly keen on Rails as for right now, but mabye in the future.
How could I setup Ruby (only) test setup where I could run some web stuff written in Ruby?
Any place to get a build of Modruby?
You could also look at Camping.
Honestly, I don't want a framework at all. I really want to play with the language as is.
In that case you should probably just use plain old WEBrick and WEBrick servlets. It should be fine for testing and tinkering.Quote:
Originally Posted by The New Guy
FWIW, if you just want to use Ruby embedded in web pages without any kind of framework, you are probably better of just using PHP. A better way of learning Ruby would be to try and write some non-web based scripts in my opinion.
In fact, an even better way to learn Ruby is using Test::Unit.
http://clarkware.com/cgi/blosxom/2005/03/18
I'd start with plain old CGI. For just playing with the language it's more than sufficent. The setup is extremely easy:Quote:
Originally Posted by The New Guy
1. Install apache
2. Install ruby
3. In apache's CGI directory (usually htdocs/cgi-bin) create the test.rb file as follows
4. Browse to http://localhost/cgi-bin/test.rb.Code:#!path/to/the/ruby/binary
require 'CGI'
print "Content-type:text/html\n\n"
print "hello web"
5. If doesn't work, check apache error.log
6. If works, try adding more code (after line 3, first three are required).
AH! Finally. I was just about to chuck ruby in the trash. Thanks.Quote:
Originally Posted by stereofrog
On a related note, I should be using rubyw.exe rather then ruby.exe right?
rubyw.exe doesn't create a console window, ruby.exe does. rubyw.exe is for gui applications when you don't want a visible console.
So, is that a yes?
I think you should use the console version (regular ruby.exe), but maybe it doesn't matter.