Ubuntu as a Ruby dev environment?

J

joviyach

Developing using things like MySQL, PHP, and Ruby has been an absolute
nightmare on my Windows XP environment. I was wondering if Ubuntu, or
some other flavour of Linux would be much better? I like what I have
seen from Ubuntu, so far, but wonder how "RoR friendly" it is?

<RANT>With Windows, I seem to spend more time trying to make the
development environment actually work, than doing any development.
It's really quite aggravating.</RANT>

Any advice appreciated.

Thanks,

Jim
 
A

Alex Young

joviyach said:
Developing using things like MySQL, PHP, and Ruby has been an absolute
nightmare on my Windows XP environment. I was wondering if Ubuntu, or
some other flavour of Linux would be much better? I like what I have
seen from Ubuntu, so far, but wonder how "RoR friendly" it is?

<RANT>With Windows, I seem to spend more time trying to make the
development environment actually work, than doing any development.
It's really quite aggravating.</RANT>
Ubuntu's great, as long as you're aware of the gotchas (which pretty
much amount to "remember to install all the -dev packages and all the
parts that Ruby was split into"). Alternatively, take a look at
InstantRails - it's a Windows package with MySQL, Rails and PHP already
set up and easy to use.
 
T

Trans

Developing using things like MySQL, PHP, and Ruby has been an absolute
nightmare on my Windows XP environment. I was wondering if Ubuntu, or
some other flavour of Linux would be much better? I like what I have
seen from Ubuntu, so far, but wonder how "RoR friendly" it is?

<RANT>With Windows, I seem to spend more time trying to make the
development environment actually work, than doing any development.
It's really quite aggravating.</RANT>

Any advice appreciated.

Get Linux. Use Linux. Push yourself thru the initial learning curve.
In 2 to 4 weeks you'll have a smile plastered from ear to ear and
wondering why the hell you didn't do this sooner.

T.
 
R

Robert Dober

Ubuntu's great, as long as you're aware of the gotchas (which pretty
much amount to "remember to install all the -dev packages and all the
parts that Ruby was split into").
That is because Ubuntu is not made for development platforms, so my
first answer would be, look somewhere else, Debian unstable (which
means stable of course, that is just Debian jargon), or probably the
best choice for development: Gentoo.

But still there are many distros around, I am quite happy with Zenwalk
(Slack based) for *simple* development.

As Tom said it so well, it is probably worth going through a steep
learning curve and if you are willing to do so opt for Gentoo.
If not get a "standard distro" and do some installations as Alex has
pointed out.

I have no problem with Ubuntu but it is not good for Ubuntu either to
be taken as the one catches them all platform as it is not (and there
will be no such platform of course ;).

HTH
Robert

Alternatively, take a look at
 
A

Alex Young

Robert said:
That is because Ubuntu is not made for development platforms, so my
first answer would be, look somewhere else, Debian unstable (which
means stable of course, that is just Debian jargon),
Debian makes the same choice. Unless that's changed in unstable, of
course...
 
J

James Britt

joviyach said:
Developing using things like MySQL, PHP, and Ruby has been an absolute
nightmare on my Windows XP environment. I was wondering if Ubuntu, or
some other flavour of Linux would be much better? I like what I have
seen from Ubuntu, so far, but wonder how "RoR friendly" it is?

Install Ruby from source and skip the debs. You'll get the most current
version. And don't look for "RoR friendly", look for developer
friendly; it's a big world and you're doing yourself a disservice to
focus on any one tool.
<RANT>With Windows, I seem to spend more time trying to make the
development environment actually work, than doing any development.
It's really quite aggravating.</RANT>

Getting Ruby running on WinXP is snake simple. There are some binaries
that are a pain to install, but I was doing Ruby dev on Win32 since 2001.

In the long run I migrated to Ubuntu, largely because there were some
annoying quirks when building Web apps in WinXP but deploying to CentOS.


--
James Britt

"We are using here a powerful strategy of synthesis: wishful thinking."
- H. Abelson and G. Sussman
(in "The Structure and Interpretation of Computer Programs)
 
R

Robert Dober

Debian makes the same choice. Unless that's changed in unstable, of
course...

Hmm hopefully that is not OT, but if one choses Debian, unstable is a
must, I feel.
So you are right Alex if you opt for stable, but really that is a crazy choice.

I just came up with a little File Server app we need for file sharing,
(thx to the list and Pit Capitain in particular). I deployed it on
Gentoo with no pain at all.
Than I wanted it to share with a different dept, they use Debian
stable, no way to get a decent Ruby version to run let alone with
openssl...
So right now I am lobbying for Debian unstable in that dept. to get my
Ruby foot into the door ....

With Debian stable it is virtually impossible to get up to date
versions and security fixes, just forget it.

Cheers
Robert
 
A

Alex Young

Robert said:
Hmm hopefully that is not OT, but if one choses Debian, unstable is a
must, I feel.
So you are right Alex if you opt for stable, but really that is a crazy choice.
Hardly. I've still got sarge boxes that I'm deploying to, and I'm
happily developing on etch day-to-day. Which features (or fixed bugs)
have changed since the distro's release? That's the only relevant
question, really...
I just came up with a little File Server app we need for file sharing,
(thx to the list and Pit Capitain in particular). I deployed it on
Gentoo with no pain at all.
Than I wanted it to share with a different dept, they use Debian
stable, no way to get a decent Ruby version to run let alone with
openssl...
Etch has 1.8.4 out of the box. That's really not that bad, thread bugs
notwithstanding. I've yet to run into anything that I need which
*requires* 1.8.5, although it sounds like your experience is different.
I have in the past used backports when it was essential to get >1.8.2
onto a sarge box, but only because that was quicker than ripping
everything out and building from source.
So right now I am lobbying for Debian unstable in that dept. to get my
Ruby foot into the door ....

With Debian stable it is virtually impossible to get up to date
versions and security fixes, just forget it.
If you're really worried about getting the latest and greatest onto a
Debian box, there's always checkinstall.
 
R

Robert Dober

Good to learn some positive points about it, and I am happy to learn
that things have evolved, however how do you get your security patches
installed???

Robert
 
M

M. Edward (Ed) Borasky

joviyach said:
Developing using things like MySQL, PHP, and Ruby has been an absolute
nightmare on my Windows XP environment. I was wondering if Ubuntu, or
some other flavour of Linux would be much better? I like what I have
seen from Ubuntu, so far, but wonder how "RoR friendly" it is?

<RANT>With Windows, I seem to spend more time trying to make the
development environment actually work, than doing any development.
It's really quite aggravating.</RANT>

Any advice appreciated.

Thanks,

Jim

Some *general* advice:

1. Develop with portability in mind. That is, if you are building
something that must be cross-platform, make sure your actually *have*
the platforms and you test religiously on them.

2. Conversely, if you are *never* going to go to another platform, make
sure your marketing folks understand that. Yes, even open-source
projects have marketing folks. :)

Now a couple of specifics:

1. It isn't clear at all what your user base is from what you've said.
If your user base is Windows users (or even potentially includes them)
then you must not only be comfortable developing and testing on a
Windows platform, but *fluent* in it. In short, get over it -- learn how
to do it and quit bitching about what a pain in the ass it is!

2. Linux users tend to have their favorite distros and think nearly all
others (and Windows) are demon spawn. Linux *customers*, on the other
hand, tend to prefer stability, security and ease of use, and thus
gravitate to Red Hat and the commercially-supported version of SuSE from
Novell. Ubuntu is clearly making inroads into this market, as evidenced
by the deal with Dell. Money talks, you know. :)

My own *personal* preference in distros for working with Ruby in
general, as it is for other open source applications, is Gentoo. Because
it's compiled from source, you get more recent versions of the major
packages in the *stable* distribution than you would in most other
stable distributions, and you get the most recent versions for testing
within a few days of their release for the small popular ones, and as
soon as the more adventurous are willing to test them for the large
popular ones.

In addition, they have nearly all the major Ruby packages and gems in
the Portage repository already, including, of course, Rails, rake, and
rubygems itself, but *also* including RSpec, ZenTest and all of the
other goodies out of the Seattle genius pool, Nitro, Camping, etc.
(Which reminds me -- I need to file a bug to get them to package Ruport.)

But if your target user base is running Red Hat or Ubuntu or Etch RoR
servers, *that's* what you need to be developing on, not Gentoo. Sorry
about that. :)
 
A

Alexey Verkhovsky

In 2 to 4 weeks you'll have a smile plastered from ear to ear

Unless you start on Gentoo, as someone else suggested. Then in 2 to 4
weeks you may manage to get it to the point where printer and sound
card work. I'm not bashing Gentoo, but it's a distro for hardcore
Linux tinkerers. Suggesting it as a first distro to a newbie is a sure
way to scare people away from Linux.

Ubuntu is a good choice because it is probably the nearest thing to a
"decent desktop OS that my mom could install and use" in the Linux
world today. Why is that a good thing? Because, as a Rails developer
you want to spend time on productive pursuits, rather than trying to
figure out how to make your VPN connection or MP3 player work.

As far as Rails development is concerned, I saw next to no difference
between Ubuntu and Debian. Except that you have to install more
packages on Debian to make it all click together. Please enlighten me
if there actually is any.

There is no point in building your own Ruby. You can safely use what
Ubuntu provides. Building your own Ruby *well* (i.e., with support of
zlib, openssl, readline etc) is not too hard, but actually is not easy
for a Linux noob.

Ruby development in Windows is not such a big pain, either. Sure,
command-line experience sucks and your unit tests take longer to run,
but none of it is really unbearable. As long as you use One-Click
Installer Ruby, and not Cygwin's.
 
D

dima

Some *general* advice:

1. Develop with portability in mind. That is, if you are building
something that must be cross-platform, make sure your actually *have*
the platforms and you test religiously on them.

2. Conversely, if you are *never* going to go to another platform, make
sure your marketing folks understand that. Yes, even open-source
projects have marketing folks. :)

Now a couple of specifics:

1. It isn't clear at all what your user base is from what you've said.
If your user base is Windows users (or even potentially includes them)
then you must not only be comfortable developing and testing on a
Windows platform, but *fluent* in it. In short, get over it -- learn how
to do it and quit bitching about what a pain in the ass it is!

2. Linux users tend to have their favorite distros and think nearly all
others (and Windows) are demon spawn. Linux *customers*, on the other
hand, tend to prefer stability, security and ease of use, and thus
gravitate to Red Hat and the commercially-supported version of SuSE from
Novell. Ubuntu is clearly making inroads into this market, as evidenced
by the deal with Dell. Money talks, you know. :)

My own *personal* preference in distros for working with Ruby in
general, as it is for other open source applications, is Gentoo. Because
it's compiled from source, you get more recent versions of the major
packages in the *stable* distribution than you would in most other
stable distributions, and you get the most recent versions for testing
within a few days of their release for the small popular ones, and as
soon as the more adventurous are willing to test them for the large
popular ones.

In addition, they have nearly all the major Ruby packages and gems in
the Portage repository already, including, of course, Rails, rake, and
rubygems itself, but *also* including RSpec, ZenTest and all of the
other goodies out of the Seattle genius pool, Nitro, Camping, etc.
(Which reminds me -- I need to file a bug to get them to package Ruport.)

But if your target user base is running Red Hat or Ubuntu or Etch RoR
servers, *that's* what you need to be developing on, not Gentoo. Sorry
about that. :)

Nowadays it is merely the same on witch OS you develop Ruby or Rails
projects.
Most of the parts you will use are OS independent or present in all of
them with minor differences.

Linux is perhaps natural environment for Ruby and Rails development
but you should always be open-minded.
You never know on which platform your next customer is on.

Personally I am on XP and Ubuntu with Eclipse and Aptana it makes no
huge difference.
Every platform has some unique things to spice our developer's life.

Use all of them if you have means.
 
A

Alexey Verkhovsky

Etch has 1.8.4 out of the box.

Etch has 1.8.5 out of the box nowadays, and running anything with
openssl on it is a breeze, as long as you remember to install all the
right packages to get a complete Ruby standard library.
 
A

Alexey Verkhovsky

Nowadays it is merely the same on witch OS you develop
That is a bold statement, but I disagree.

If I had to buy myself a new laptop, I would go for a Mac. Primarily
because it is the best "desktop that my mom could use" on the market,
that nevertheless has a Unix-like command-line experience.

Also, deploying Rails on Windows is a pain.
 
P

Phlip

Debian makes the same choice. Unless that's changed in unstable, of
course...

So my colleague has super-modern wide-area WiFi (somewhere in Europe), and
he puts Ubuntu on his notebook, to match mine.

Then Ubuntu can't do WiFi with WEP. He has to go to an internet cafe to
integrate. Ay-yi! Ubuntu sucks!!!
 
J

Jano Svitok

So my colleague has super-modern wide-area WiFi (somewhere in Europe), and
he puts Ubuntu on his notebook, to match mine.

Then Ubuntu can't do WiFi with WEP. He has to go to an internet cafe to
integrate. Ay-yi! Ubuntu sucks!!!

I suppose it's not less possible with ubuntu that with any other linux
distro (the only difference I can imagine is GUI vs. command line). I
am to configure ubuntu+wep in a few days, so I can share my results if
you care.
 
A

Alex Young

Alexey said:
Etch has 1.8.5 out of the box nowadays,
So it does.
and running anything with
openssl on it is a breeze, as long as you remember to install all the
right packages to get a complete Ruby standard library.
Indeed. Although working it out and getting a complete list together
takes a couple of goes unless you make notes the first time :)
 
A

Alex Young

Robert said:
Good to learn some positive points about it, and I am happy to learn
that things have evolved, however how do you get your security patches
installed???
apt-get update, generally...
 
M

Mark Gallop

Phlip said:
So my colleague has super-modern wide-area WiFi (somewhere in Europe),
and he puts Ubuntu on his notebook, to match mine.

Then Ubuntu can't do WiFi with WEP. He has to go to an internet cafe
to integrate. Ay-yi! Ubuntu sucks!!!

If the laptop has a wifi card with linux drivers then Ubuntu will
connect using wep.

Mark
 
M

M. Edward (Ed) Borasky

Ian said:
If you are willing to try persevering with Windows one more time before
jumping to Linux or OS/X then have a look at Instant Rails
(http://instantrails.rubyforge.org/wiki/wiki.pl?HomePage). Here is a quote
from the website:

"Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails,
Apache, and MySQL, all preconfigured and ready to run. No installer, you
simply drop it into the directory of your choice and run it. It does not
modify your system environment."

Ian
Instant Rails has Scite bundled, right? I know it's in the One-Click
Installer, but I've forgotten what the overlap points are between
Instant Rails and the One-Click Installer.

By the way, IIRC Instant Rails also includes PHP, so it's also a
complete WAMP stack as well as a complete Rails stack. At some point
when I run out of useful things to do with my time, I'll see if I can
get the Moodle course management system to work with the PHP in Instant
Rails. :)

Just kidding ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,318
Members
48,002
Latest member
EttaPfeffe

Latest Threads

Top