New to Ruby, need install advice

I’m hoping I can get some advice on Ruby installs, as I sit a bit
confused at this point.

I’ve decided to learn Ruby to increased my job potential/value, and
because I’ve heard Ruby/Python (both of which I intend to learn) can do
a lot of fun stuff that languages like PHP cannot. To that extent, I
decided to start with Ruby, and am trying to install Ruby locally.

I already have WAMP installed, to run my PHP/MySQL, and I’m trying to
figure out how to install Ruby to work with my WAMP.

So first… is this a situation of making Ruby work “with” WAMP? Or is
it just concurrent? I presume that Ruby requires a software like Apache,
so it should make sense to install Ruby to work with my WAMP server,
correct? If not, is the MySQL all that’s necessary? I figure if I need
to write a site that makes use of both PHP and Ruby, it should be
concurrent, right? Or should that never happen/doesn’t make sense?

Next, does anyone have any experience installing Ruby with WAMP? I’ve
tried googling for results, but I’ve only come across articles that are
years old, using softwares that the sites they’re hosted on openly state
are outdated. The closest I’ve come to “modern” (or not mattering to
time) is from

but it requires “Mongrel”, which I don’t quite understand. It also seems
to indicate I need to create a new port forwarding for every Ruby app I
write? Is this a limitation of this install method, or of Ruby? It seems
inefficient when you consider in comparison you can run any PHP site
straight from a folder.

And any advice to getting started with Ruby/Rails and any book
recommendations would of course, not go unappreciated. Compared to
starting PHP, C++, or Java, I feel lost getting started with Ruby, and I
can’t tell if its because I’m over thinking it, or I’ve missed something
entirely.

Well, WAMP isn’t a very common option for deploying Rails apps.

Note that you don’t need WAMP to make ruby apps. You do need some kind
of
web stack if you are making web apps in Ruby (which I think is what you
want).

You might want to consider Rails Installer http://railsinstaller.org/
which
will set you up with a basic web stack for personal development.

However, deploying any Ruby web app (i.e. publishing to host) is quite
different than for PHP.

Yah, I figured launching a Ruby app would be harder then a simple PHP
one.

I guess I’m most interested in integrating the WAMP stack with Ruby
because I’ve heard you can create interesting integrations between Ruby
and PHP, namely things like creating listeners to do actions (such as a
chat room) without the timeout polling PHP would otherwise require to
create a “live” effect. If I heard wrong, maybe at least learning how to
use my current MySQL install.

All in all, I’m just a bit of a neatfreak when it comes to my files; if
its possible to use the same service to run both, I’d be most happy with
it, and if not, I’ll go with a separate Ruby installer (I’ve already got
Rails Installer downloaded and waiting). I was just hoping to see if the
two could be “merged” easily, or if I need to really learn the
server-side of both techs to get it.

Can you explain what Mongrel is? Is it another server tech like Apache?

On Thu, Apr 26, 2012 at 1:01 PM, Rohit S. [email protected] wrote:

Yah, I figured launching a Ruby app would be harder then a simple PHP
one.

I guess I’m most interested in integrating the WAMP stack with Ruby
because I’ve heard you can create interesting integrations between Ruby
and PHP, namely things like creating listeners to do actions (such as a
chat room) without the timeout polling PHP would otherwise require to
create a “live” effect. If I heard wrong, maybe at least learning how to
use my current MySQL install.

You will probably find that the WAMP is pretty tricked out for PHP. Ruby
uses a different deployment strategy using different systems. It is
possible to get it going I am sure, but probably more pain than it is
worth
(I think you would need to use Fast CGI).

Can you explain what Mongrel is? Is it another server tech like Apache?

Yes. You can also run it as a service.

Have you considered Nginx as a webserver (or even proxy to Apache)? I
find it easier to work with Nginx and configure it for different things.
Others might disagree, but the simplicity of just firing up nginx.conf
where you can directly tell it what to do with various requests, can be
easier than tinkering with Apache. I will probably get shot for saying
that, but it is an alternative :wink:

For Ruby I highly recommend: Programming Ruby 1.9, Dave T.
(Pragmatic Press). I did Lynda.com’s Ruby tutorial first, though started
reading this book part of the way through the tutorial and that really
made me realise just how good the book is.

The way I am feeling about Rails right now I am probably not a good
person to recommend anything on it. It is a real frustration to get
working, and I dread to think how you would get it working with your
current setup. It comes with Webrick as default. RoR is a whole level of
complexity above Ruby, and you might want to have fun in Ruby before you
get frustrated with Rails.

For a good overview of how RoR works (and I would recommend this before
even attempting to do anything in it) you can listen to the Learning
Rails podcasts: http://www.buildingwebapps.com/learningrails

These I found to be the clearest on explaining how it works. From there
I then did various screencasts and books, but to be honest found most of
it either contradictory or confusing. The reason for this is that there
are so many changed, some undocumented, that whatever you are reading,
in print or on the web, might not be the right version number. Be very
careful you do not end up with a Version 2 book for example, as this
will lead you right up the wrong path.

Good luck! :slight_smile:

I use Apache + ruby .cgi scripts.

But for my local use mostly. It helps me connect my different ruby
projects and I use my own pseudo-webframework (which is far from
finished, as I still rely on ruby cgi, because I am so lazy).

I write this to answer your question:

I already have WAMP installed, to run my PHP/MySQL, and I’m trying
to figure out how to install Ruby to work with my WAMP.

If you mean the Windows Stack, and have apache, I am absolutely sure any
ruby .cgi script will work on windows too. I am mostly on Linux, but I
am sure my ruby scripts would work on windows too, with a few small
modifications.

As for your question how to start with ruby, I think the only real way
to learn ruby is to go and write ruby scripts on your own. You need this
because your brain needs to start to think in Ruby. I dont know what
way will work for you, for me it helped that I collected snippets of
information locally for a long time i.e. I made my own knowledge base.

Others might disagree, but the simplicity of just firing up nginx.conf
where you can directly tell it what to do with various requests, can be
easier than tinkering with Apache. I will probably get shot for saying
that, but it is an alternative :wink:

I dont think anyone will shoot you down for this.

Apache changed their config files not too long ago. I wanted to upgrade,
but I spent TWO hours fiddling with the config file until I decided I
no longer care and reverted to an older Apache version. Which works
very well with my old httpd.conf file.

I have decided, however, to make my configuration more modular, and use
different files. And in the long run, I will use a yaml file to
describe what I want, and then let a ruby script translate this into
nginx, apache config etc…

I got REALLY really tired of configuration files that change.

IMHO, I dont think configuration FORMATS should ever change.

The INFORMATION, the intent, what I want, is already there.

Why do I have to invest my time to cater towards a software
that just gets constantly changed? This is, by the way, a
general point that annoys me. There are too many different config
files and config options… for the worse of it. It leads to
complexity, verbosity rather than clarity. It’s the Linux evolution
mode, inspired by C - everything becomes a real chaotic mess as
time passes by. And it takes constant effort to battle that
complexity.

I hate this.

Hope its ok to dredge up a thread a few weeks old…

Ok, so given advice here and elsewhere, it seems to make the most sense
to use Rails Installer to put ruby/rails on my system. It seems Rails
Installer has MySQL packaged with it; however, I already have MySQL
installed with WAMP, and I don’t want to risk something happening to it
(I have a lot of work on my PC with my WAMP server that I can’t afford
to have affected).

Will Rails Installer affect my WAMP setup? Is it possible to make use of
the WAMP MySQL with Instant Rails instead of the MySQL that comes with
it?