SitePoint Sponsor |
|
User Tag List
Results 1 to 9 of 9
Thread: Ruby... how to setup and run.
-
Jun 26, 2005, 23:19 #1
Ruby... how to setup and run.
Hello,
I've recently setup an apache server on my desktop with PHP, MySQL and PHPmyAdmin and it all works fine.
I also setup Ruby on Rails and it uses its own HTTP server, WEBrick.
1) How do i setup ruby to run as mod_ruby on apache? I've searched forums and google a bit but havn't found anything.
2) Using WEBrick, how do i access xxx.rb files? . If i go to 127.0.0.1:3000/xxx.rb it gives an error because i'm not using the proper Rails framework (or something). For example, with apache i just go to 127.0.0.1/phpfiles/xxx.php to run a script, how do i do the same w/ ruby?
3) Just a confirmation -- Ruby is more of a language than just for the internet? From my understanding, PHP is a web-based language but Ruby can do more than that? i'm not really clear on this. I looked through my c:/ruby directory and I'm trying to figure out how this all works...
Any comments would be appreciated, i'm really a newbie
-
Jun 27, 2005, 21:40 #2
Today I found mod_ruby but their install instructions just said
== Installation
(1) Type `./configure.rb' to create Makefile.
(Type `./configure.rb --help' to get a help message.)
(2) Type `make' to compile mod_ruby.
(3) Type `make install' to install files.
(4) Edit `httpd.conf'. (see examples/httpd.conf.)
(5) Restart Apache.
I tried IRB and regular windows command prompt. neither worked.
-
Jun 28, 2005, 08:55 #3
- Join Date
- Aug 2000
- Location
- Houston, TX, USA
- Posts
- 6,455
- Mentioned
- 11 Post(s)
- Tagged
- 0 Thread(s)
The installation instructions for mod_ruby that you posted look like they are for Linux.
You need to find Windows instructions.ssegraves [at] gmail.com
On Image Use, Abuse, and Where We're Headed
stephan | XMLHttpRequest Basics
flickr | last.fm | Cogentas, LLC
-
Jun 30, 2005, 05:51 #4
- Join Date
- Jan 2005
- Posts
- 45
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
FYI:
You shoudn't be using mod_ruby for Rails apps. It's unstable and will eat small children alive.
http://wiki.rubyonrails.com/rails/show/mod_ruby
FastCGI is the perfered way of interfacing Rails with Apache.
-
Jun 30, 2005, 18:48 #5
well, for rails i was going to use WEBrick.
for general ruby development i wanted to use mod_ruby.
does that sound like a good way to go?
-
Jul 1, 2005, 11:02 #6
- Join Date
- Jan 2005
- Posts
- 45
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dionysis
-
Jul 1, 2005, 14:01 #7
uhh.. context . does that count?
maybe you can help me out here, i'm not too familiar with that stuff.
-
Oct 13, 2005, 09:58 #8
- Join Date
- Jul 2004
- Location
- Gerodieville Central, UK
- Posts
- 446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OK, for development, you want to use Webrick, for production work, aviod apache, and use Lighttpd and fastcgi. Look into setting up the proxy modules if you have to run Apache as well as Lighttpd. For most cases, you can ditch Apache and use Lighttpd.
Basically, rails has two main modes, Development, and Production. You can change this in ./config/database.yml if my brain serves me right. Basically production mode uses some clever cache tricks to speed things up, and hides any complex errors in your apps so there is no security compromises. Development modes make give you more detaild error messages.
For general ruby development you don't need a webserver at all. Ruby is not like PHP, it's not tied to a specific task. However, if you are looking at GUI apps, you wanna look at some of the GUI libraries out there. Some will say Python is better for GUI apps as it compiles more, and is a tad faster, and it's fairly similar to Ruby on the surface.
-
Oct 14, 2005, 12:50 #9
- Join Date
- Aug 2002
- Location
- London
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by MiiJaySung
If you're using lighttpd you'll want to set this in your lighttpd.conf for you application, or httpd.conf (or an include file if you're using a vhost setup).
Of course the quick way is to change the line in the file config/environment.rb which reads
Code:RAILS_ENV = ENV['RAILS_ENV'] || 'development'
Bookmarks