I need a real UNIX RoR development environment - ruby-on-rails

From the beginning, I am a Windows master. I started with MS-DOS. I put up Windows 2.1 and every Windows since. I have 10 different Windows boxes running in my house right now, from Windows 7 Ultimate to varied flavors of Windows Servers. I haven't done Windows 8 and don't want to go there.
I have UNIX experience with both servers and varied software, but it hasn't been my preferred environment. However, I guess I am converting. I've tried to pretend to run UNIX under Windows using Cygwin and MSYS. My purpose is to build a development environment. Both have failed me. I have spent more time trying to fix a series of technical issues than I have developing. That is unacceptable.
My Ruby on Rails development environment is by far my highest current priority. I have websites to build, right now.
At this point, I have two options. One is to find a UNIX development environment in a cloud. The other is to convert one of my many machines to a true UNIX system. So, I need advice. I don't really want to build and babysit a system. The idea of a cloud-based development environment is very interesting, with the caveat that I don't chase it down another rat hole like I have with Cygwin and MSYS.
Here are the questions. Is there a solid cloud-based Ruby on Rails friendly development environment out there? Failing that, should I put up an Ubuntu-based system. If I go there, do I convert a workstation or a server?
Thanks...

I highly recommend Vagrant. I use this to do development on my Windows systems.

As you found out, Windows is terrible for RoR development. Your best option would be to use a VM like VirtualBox to run a Linux/Unix instance. There are other VM options, but VirtualBox is free.
Failing that, just convert once of your boxes to Linux/Unix. For development it does not matter one bit if it is a workstation or a server.

Mac OSX
The unofficial standard for RoR production is Linux, but for development it is Mac OSX. There has been a big migration of developers to the Apple platform that has been going on for many years now.
It gives you the best of both worlds: it is Unix underneath but it's also a commercial platform, a polished UI, and an available software ecosystem.
Yes, it's expensive, but people should ask themselves, why are people willing to pay so much? If you can afford 10 boxes for Windows, how about finding $ for one Mac? Then, you will have not just a workable RoR environment, but the best.
Or go VM
But if you don't take that advice, you may want to install a Hypervisor like Xen or XenServer for free, and then you can run both Windows and Linux on the same machine. This is slightly different than running a VM under Windows.

Externally, I have received a recommendation for EngineYard.com as an outstanding RoR environment and will ultimately consider it as my primary development/migration/production environment.
I have a working Debian system now and am building it out as a local RoR environment. It just seems to be right for a serious RoR development environment. I will go there as soon as it is fully built out because RoR is just meant for UNIX.
However, at least temporarily, I have found that RubyStack is a seriously usable Windows RoR development environment. It is 100% usable as a standalone system that doesn't require UNIX-style environments shoehorned onto Windows. Trying to run UNIX on Windows was a constant source of frustration, so this meets my immediate needs.

Related

How to set up Rails dev environment on MacBook Pro running Windows 7?

Work has issued me a MacBook Pro, but I am primarily an ASP.NET (C#) developer, so I spend most of my time in Windows 7 running on VMWare Fusion.
I have been asked to begin working on Ruby on Rails projects (which I am looking forward to). I find that I prefer the Windows 7 OS as I tend to be more productive in it over OSX, so I would like to setup my Rails dev environment on Windows 7.
Based on other user's experiences, I would like to know your recommendations how how to setup my Windows 7 environment to develop Ruby on Rails with Postgres as the database.
While doing some initial research I did find this post on using Vagrant with VirtualBox which sounded interesting, but I am wondering if I could just do something similar with my existing OSX install.
Also, I am not completely opposed to running my Rails dev environment in OSX, so I am willing to hear arguments in favor of this approach. Do Windows and Rails/Postgres work well together as a dev environment?
Thanks for any helpful feedback you can provide.
I'll try to persuade you to use OS X.
Windows ruby development brings a vast amount of problems with gems. Especially with native extensions.
The second argument for OS X, is that it is UNIX based system, which is much closer to production environment. Nobody deploys to windows.
Most of ruby tutorials and manuals require unix based system.
Just give OS X a chance, and you will be much productive, spending time on you applications business logic, and not asking other questions, related with windows&ruby problems.
Don't use vagrant inside windows at vmware fusion. It seems really strange :)
The most common ruby development style - is simple text editor and terminal. Thats all, you don't need windows for that.

Creating a Ruby on Rails environment on Windows, in a VM Vagrant Box

Is Vagrant a good solutions for creating a Rails environment in windows?
I have a powerful Windows 8 64bit desktop. I recently did a project with RoR and fell in love with it. As I found out, installing RoR on windows is just bleh; so I created a dual boot to ubuntu. As a creative developer, I find it rather difficult to get any of the "creative" done in ubuntu because of the lack of my typical creative tools.
I read a bit about a tool called Vagrant; however, I'm still unsure if it meets my requirements: adobe suite, sublime text, git, rails, rails friendly OS(mac?/ubuntu)
Typical duties: edit an image in photoshop(windows), drop it to project assets in VM?
Typical duties: push/pull to git; ssh to VPS server?
Also, I hear you can install mac os in the VM do you think thats a good option? (because I want to try their new OS)
Installing osx in Vagrant is probably possible but it would likely be quite hard, and its not really what vagrant is designed for.
As for your other questions vagrant sounds like the perfect fit.
With Vagrant you could start up an ubuntu vm and get your rails setup going. Then you could just forward a port on your local machine to the vm and load the rails site as if it were running locally on your windows PC. A quick google gets this vagrant box that looks like it might work for you - https://github.com/amaia/rails-starter-box
To work with the site you can just share a folder between the vm and your local machine which will allow you to edit images and code with your windows apps (Photoshop, sublime) so you don't actually need to install these in the ubuntu vm at all, and can pretty much work as normal.
Git is much the same... I prefer to SSH into the vagrant box and use git on the command line in ubuntu but you can just as easily use gitbash or tortoisegit from windows in the repo folder... works just as well.
A good alternative is, https://github.com/fgrehm/ventriloquist
"Ventriloquist combines Vagrant and Docker to give developers the ability to configure portable and disposable development VMs with ease. It lowers the entry barrier of building a sane working environment without the need to learn tools like Puppet or Chef."

Most stable (headache free) development environment for Ruby on Rails?

Would some of the more advanced rails developers please share what they have found to be the most productive combination of OS, IDE, etc. (i.e. the set-up that gives the least of amount of compatibility issues, headaches)? Also, what is the most commonly used setup?
I presume the common setup is common because it is thought to be the best compromise between all the options.
And that common setup is:
Mac OS X
TextMate
rvm
There's a lot of nuance to your question, for example you'd probably want to take into account what you already have, what your appetite is for spending money, etc. This is before even coming to the minefield of personal preference. :)
Here's a starter list:
Operating System
In my experience on both, Mac > PC for Rails programming because it creates fewer unforeseen/annoying problems.
IDE
Depends on how 'rich' you like your environment to be. Some people who like light environments simply use Notepad++; others use richer options like TextMate (Mac only) or RubyMine.
General Set up
Rails 3.1, MySQL
Local Server
Webrick and Mongrel are fairly popular.
Hosting
Heroku is extremely popular for Rails apps. It's free for low traffic and they're beautifully designed for Rails. If you want to avoid the server reloading problem (webpages take a while to load if no one has requested them in a while), you can set up NewRelic or Pingdom to ping the app and keep it active.
Performance Monitoring
NewRelic
I moved from Windows for Rails 3 to a Ubuntu 11 virtual machine running on Windows via VMWare player.
I'm using Gedit along with GMate (source here) to make Gedit more similar to TextMate for Rails Development.
I've found the setup to be way faster running on the virtual machine than it was on Windows directly. It took some time to get set up but once done, I just transfer the vm image from machine to machine. The setup was all free too (besides my laptop and the copy of Windows 7 on it).
The most common development environment I suspect you'll find among the Rails illuminati is probably:
Mac OS X (though some use Linux)
various Ruby versions/gemsets in RVM
TextMate or MacVim as the IDE (gvim or vim for the Linux folk, usually, though some prefer Emacs)
SQLite or MySQL for development database
Webrick, Mongrel, Thin, or flavour-of-the-day lightweight local webserver

Ruby On Rails :Upgrading to 2.3.11

What kind of development environment needed to upgrade a webapplication developed in older version of Ruby deployed in Linux to latest version 2.3.11.
I am a windows .net developer and looking some help in terms of understanding the development environment. I know little bit about pearl and ruby.
Do i need to install Linux or mac. Or can i develop/test in windows and once ready deploy to linux?
I have a linux server, can i use that as development server and do the Remote desktop from my windows to that for development work? What IDE i should get install in that linux server.
any help will be appreciated.
Choice of development environments.
While you could develop your app in Windows and then deploy to a Linux server, that's almost never the right choice. Since you already have access to a Linux machine, Windows is certainly not the right choice in this case.
As for an IDE on the Linux box, you don't need one. Do yourself a huge favor, choose to learn either vim or emacs, suffer with the mental phase shifting for a week, and do all of your work via ssh to the Linux box. You will be slower in the short term, but the long term payoff is huge.
I would be willing to bet that you'll lose less time while learning one of those text editors than you will lose by dinking around with Ruby + Windows and then trying to sync that with your Linux environment.
Upgrading Rails to 2.3.11
This begs the obvious question. What version does the app use now? 2.3.* to 2.3.11 is a piece of cake. If you're talking about more ancient code, then plan on some pain and refactoring. If the code is really old, then seriously consider going straight to Rails 3.

Port a Rails App from Windows to Mac or Linux

Hello I've been a Rails developer on Windows for quite some time now, but I recently completed my biggest project yet (it's quite extensive, took me over a year to build) but I am having trouble deploying it. The combination of it's size, complexity and a windows environment is making it needlessly complex to deploy. I am thinking about getting an old mac mini and using it just for rails development.
Either that or install unix on another box.
Is there any way I can port my app to this mac or linux machine, without having to start over? I can't find any resources on the internets about this.
Rails is designed to be fairly platform flexible. What gems are you using in your application that won't run on linux / OS X? Usually compatibility issues run the other way (as very few Rails professional developers run Windows). It is hard to debug when you don't include any of the errors you get, etc.
Unless you have very specific system calls in your app there shouldn't be any need to "port" anything as it should work as is on Linux or OS X. Out of curiosity, what kind of problems are you running into with deployment?

Resources