Re: Learning Rails - Advice for development environment

93 views
Skip to first unread message

Fai Wong

unread,
Mar 19, 2013, 8:39:31 PM3/19/13
to rubyonra...@googlegroups.com
Hi Michael,

I'm an ASP .Net dev guy for close to 7 years now and have always used PC. Last year I bought a Macbook on Gumtree and have recently found a lot of joy in programming Ruby on Rails using Terminal. I run VMware Fusion with Windows OS for my .Net dev but found myself doing less of that now.

Sometimes I just power on my PC with windows and then remote desktop via Chrome. That worked well too.

- Fai

On Tuesday, March 19, 2013 6:46:31 AM UTC+11, Michael Armistead wrote:
Hello,

I have been learning Rails for several weeks now. I am working through Michael Hartl's tutorial and other various things. My question is basically regarding what type of environment to do my development in. First, some background:

I have used different linux distros on and off throughout the years, so it was easy and familiar for me to set up my desktop computer with Mint and get rvm/rails etc installed and working correctly. No issues there.

However, I went out and bought a laptop this last weekend; I have never installed any linux variant on a laptop, so when I did it was startling to find out how incredibly terrible the battery life / power management functions were. I was getting ~2 hours of life just doing simple web browsing. After spending an afternoon tweaking everything (using powertop, thinkfan etc), I was able to increase that marginally.

Then, I had someone recommend that I use win7 as my host OS, and then use a VM for rails development. While doing some research, I came across Vagrant. I got it set up and installed using one of the boxes made for rails development, however I have not started using it yet. I guess the idea is still quite fresh regarding workflow. If I was using a standard VM with ubuntu or whatever, I would boot it up and do my work inside just as if it was the host OS. When it comes to Vagrant, I am a little more confused.

Am I supposed to start my headless vagrant box, start all my services / rails server etc inside, but then have Sublime Text 2 on my host OS - and work out of the shared directory while just performing tests inside of the VM?

I use Guard / Spork on my desktop - how do I set this up within Vagrant? I have read that some people have issues with it.

Am I going to run into any problems down the line running windows as my OS for coding / the VM for testing and server?

Well, I am rambling. This whole idea is just very fresh for me, so I am just looking for any feedback possible. I want to get my development environment set up as fast (but as stable) as possible, so I can get back to learning more rails!

Thanks everyone,
Michael

Fai Wong

unread,
Mar 19, 2013, 8:41:44 PM3/19/13
to rubyonra...@googlegroups.com
Dropbox comes in handy too, this way you can do development anywhere. I haven't tried the Windows tools for RoR and prefer Mac style when it comes to RoR.

rtacconi

unread,
Mar 20, 2013, 6:54:33 AM3/20/13
to rubyonra...@googlegroups.com
I am using a Mac so I do not have you problems. Is you laptop certified for a specific distro of Linux. Do you know that Dell and may be HP have laptops certified for Ubuntu and Redhat? I personally would try to use Linux, bash, git, apt-get, more performance. I would try to fix Linux issues. You could develop in Windows, Ruby works on it. Vagrant is good, you can just run 'ssh vagrant' and call tests and guard from you windows shell. The problem is that Windows shell is rubbish and you have to use putty because Windows does not have ssh. I would just avoid to use Windows entirely, it is too limiting. I would try to fix LInux issues on the laptop or buy another laptop, seriously.

jle...@socit.co.uk

unread,
Mar 20, 2013, 7:50:57 AM3/20/13
to rubyonra...@googlegroups.com
Hi Michael,
I think the problem may be with the hardware being too new.  Some lap tops have good comparability with mainstream linux distros.

I had better success with older hardware and although they run slow under windows (which is by design by M$) they run quite fast under linux.

For example Lubuntu 12.04 installs without problem on a Lenovo 3000 N100.  With rvm and RubyMine I can run multiple versions of ruby and rails.

bradley...@gmail.com

unread,
Mar 21, 2013, 8:35:04 AM3/21/13
to rubyonra...@googlegroups.com
I have been using Linux as a desktop since 1998. I can vouch for how ideal Linux is for RoR dev. It's a natural home for it. I have done loads of RoR projects on Linux, obviously.

I don't have a popular view. I think that an IDE is essential to RoR work (or any development). Proper debugging is always required. I spent an awful lot of time researching IDEs and by far the best was Netbeans, but unfortunately they have dropped support for Ruby in the latest versions!

I haven't really found a good replacement IDE. On Linux, vim is ruby-aware. However, debugging and profiling aren't a luxury, they're essential and using text editors just doesn't hack it.

My own preference will be to consolidate on Eclipse as it's pretty much the swiss army knife of IDEs and if, like me, you are multilingual, its' your common denominator especially if you combine Rails and Java (GWT anyone?).

The problems that you are having with battery life sound very much like it's either your battery/hardware or something terribly wrong with your linux. I use linux on all my laptops. In fact my main dev box is a Dell M1730. Now out of date but it's such a comprehensive setup that I can't readily migrate to an updated machine (and it's powerful enough for my needs to why change?).

I have always found Linux to beat Windows hands-down on performance, lightness of overheads and certainly it's not a battery drain! On the rare occasion that I need Windows, I run it under vmware very successfully.

Try a fresh Ubuntu (I prefer Kubuntu as I prefer KDE) installation. Ubuntu is brilliant at "just working".

A big Apple advantage of course is that it "just works" and it's also unix (BSD), so you get the best of both worlds, but at a premium price tag.

Michael Armistead

unread,
Mar 21, 2013, 11:54:09 AM3/21/13
to rubyonra...@googlegroups.com
I would really like to thank everyone for their input and opinions. Right now, I have done a clean install of Ubuntu and I will tweak it here and there until I can get battery life where I want it. I have been using Sublime Text 2 with several plugins, although in the future I may try a true IDE to see what the differences are.

Also, I do recognize that a Mac would be the best all-around computer for me, but I just cannot justify the cost right now (especially as I am not making any money yet doing rails! Actually, I've been in the automation/controls industry for ~9 years, and just now deciding to learn something new).

Thanks again - great community here!!!

Robert Walker

unread,
Mar 21, 2013, 2:27:35 PM3/21/13
to rubyonra...@googlegroups.com
Michael Armistead wrote in post #1102638:
> I would really like to thank everyone for their input and opinions.
> Right
> now, I have done a clean install of Ubuntu and I will tweak it here and
> there until I can get battery life where I want it. I have been using
> Sublime Text 2 with several plugins, although in the future I may try a
> true IDE to see what the differences are.

I'll have to somewhat disagree with the idea that a true IDE is
essential to Rails development. I have been involved with our local Ruby
user's group, here in Atlanta, for several years and I've not seen a
single presentation, or know of any Ruby developers that uses an IDE.

I really don't find myself using a debugger much at all when developing
Rails. If I do find a use for stepping though code I take that as a sign
that I'm doing something wrong. Either my methods are too complex and
need refactoring, or my test cases are insufficient. As for performance
metrics, there are plenty of better (IMHO) ways to do that. Ones that
are not dependent on a particular IDE.

What I see the vase majority of developers using are VIM, Sublime Text 2
& TextMate, with Sublime quickly taking over TextMate's share. It's also
worth noting that over 90% of the developers in our group use OS X with
nearly all the remaining 10% using some flavor of Linux. I've not met
anyone personally that develops on Windows. i know they are out there, I
just haven't met anyone in the area that does.

--
Posted via http://www.ruby-forum.com/.

Dmitry Maksyoma

unread,
Mar 24, 2013, 1:16:12 PM3/24/13
to rubyonra...@googlegroups.com
On Friday, March 22, 2013 1:35:04 AM UTC+13, bradley...@gmail.com wrote:
A big Apple advantage of course is that it "just works" and it's also unix (BSD), so you get the best of both worlds, but at a premium price tag.

Homebrew is inferior to APT. For example, if you install Postgres, you don't get daemon running automatically, you have to run it manually. Stone fucking age, OSX. I do all development on Linux, but 50% of time work fom Macbook via ssh.

Tommy Pollák

unread,
Mar 24, 2013, 5:09:03 PM3/24/13
to rubyonra...@googlegroups.com
Yes, it seems that Linux's (Ubuntu in my case) battery management is not as good as that of Windows 7.

I am running 12.04 and W7 as alternative OS on a Dell XPS. As an old Unix developer I use emacs on Ubuntu (and xemacs  on W7) as editor. It has nice modes for a lot of programming languages. Debug facilities of RoR are very nice, so why an IDE? rbenv for different versions of Ruby and Rails.

Regards
Reply all
Reply to author
Forward
0 new messages