i'm playing with rails as a personal side project and could use some advice on setting up a productive development platform. the target for the project is linux. for development, i have access to windows pcs and the console of a remote linux box. i could use emacs on the remote linux box but since i am green think i should take advantage of an IDE. how realistic is it to develop on windows and deploy on linux? is there some insta-syncing technology that would allow me to edit on windows and test on linux (over ssh)? TIA
on 2007-07-27 23:00
on 2007-07-27 23:29
I am doing as you have described -- developing on Windows and deploying on Linux. My first deployment was hard, time-consuming, and required a fair amount of trial and error. However, now that I have a handle on it, life has been pretty easy. I am using Capistrano to deploy. When I have a new version to upload I simply type "rake deploy" and I'm done. Capistrano uses ssh to handle the uploads. The two biggest issues were: 1. Line endings. You need to make sure your files all use Unix line endings. Windows line endings in files (CR LF) cause RoR to wreck. 2. Configuration files (environment.rb, etc.). It took a little playing around to find the right settings. I imagine this would be the case no matter where you do your development. I have found the RoR community to be very helpful. As long as you are willing to do a little legwork you should be able to get the help you need.
on 2007-07-27 23:41
so i sense a startup cost of getting the windows box set up with rails and figuring the frictions of transferring code between the two platforms, but once past that early phase the experience is pleasant? thanks for sharing, i'll give the combo a whirl.
on 2007-07-28 00:21
Ming wrote: > so i sense a startup cost of getting the windows box set up with rails > and figuring the frictions of transferring code between the two > platforms, but once past that early phase the experience is pleasant? There are reasons to do that, yet there are also reasons to... - share the Linux drive with Samba - share the Linux GUI with cygwin-x - point your favorite Windows editor at the Linux drive from Windows - drive the Linux Webrick and 'rake' in a Konsole in cygwin-x That way if your favorite editor happens to work in Windows you are not screwed. -- Phlip http://www.oreilly.com/catalog/9780596510657/ ^ assert_xpath http://tinyurl.com/23tlu5 <-- assert_raise_message
on 2007-07-28 00:43
oh i like this idea -- this is along the lines of what i had in mind originally. i'll try this first, with some modifications (putty over ssh versus cygwin-x).
on 2007-07-28 00:49
Ming wrote: > oh i like this idea -- this is along the lines of what i had in mind > originally. i'll try this first, with some modifications (putty over > ssh versus cygwin-x). I might not understand putty; I suggested cygwin-x because I can run most Linux programs as windows mixed in with my Windows windows. One keyboard, one mouse, alt-tab to go between them, and almost no display bugs! -- Phlip http://www.oreilly.com/catalog/9780596510657/ ^ assert_xpath http://tinyurl.com/23tlu5 <-- assert_raise_message
on 2007-07-28 01:21
Ming wrote: > oh i like this idea -- this is along the lines of what i had in mind > originally. i'll try this first, with some modifications (putty over > ssh versus cygwin-x). You may want to install xming . Aside with enabling X11-forwarding in your putty-config (and sshd-config) this give you the ability to start xwindows on linux-side and have the windows show up on - er - Windows. I found cygwin-x a rather big package to install if you only need an X-server. I'm using SciTe and jEdit - both can be configured to write unix-line-endings.  http://sourceforge.net/projects/xming Cheers Stefan
on 2007-07-28 01:33
I considered the approach of running an editor on Windows to edit files that reside on the Linux server. I went with the "develop on Windows, deploy on Linux" approach so I could develop on my laptop from anywhere (even without a network connection) and deploy when I was ready (and connected to the network). I suppose if you do all your work when connected to your network then this concern is not relevant.
on 2007-07-28 16:53
I use the same development approach, Windows laptop to Linux server. I use either Notepad++ or Notepad2 as an editor (still trying to decide which I like more). Both allow you to save in *nix format. Good luck.
on 2007-07-28 17:16
What about running a complete Linux system inside VMWare workstation ?
on 2007-07-29 04:44
I actually develop on windows and then deploy to linux. I used the 'e editor' for windows its like textmate but for windows. But this comes down to choice. I then just use all the usual stuff for development. When deploying thou I fire up vmware (free) and use copy of Ubuntu to do the actual deployment. I just found easier to use linux distro to do the deployment instead of cygwin. This setup works well. I also have my svn on a linux machine and use svn for windows and it works great.
on 2007-07-29 15:02
Serengeti wrote: > 1. Line endings. You need to make sure your files all use Unix line > endings. Windows line endings in files (CR LF) cause RoR to wreck. Also, I recommend that you double-check that you're following the proper Ruby style to indent using two spaces instead of tabs. That's bitten us before. Otherwise your scenario is certainly realistic. Around 50% of our developers work on Windows and release to FreeBSD, Linux, and Solaris boxes without a hiccup. -- Roderick van Domburg http://www.nedforce.nl
on 2007-07-29 21:58
it took a bit of work but i set a working samba share on the linux box and imported a demo project imported into radrails on windows, very cool. i tried to setting remote graphical access to the linux box a few weeks ago and found the project a total disaster. getting samba to work was bad enough with windows networking, samba configuration, and putty ssh to contend with. graphical linux -- trying to get working VNC in the stack too -- was a disaster. With so many layers to perfect, i couldn't get anything to work. (the box is remote.) i might give xming over putty a swing. what are the benefits of a GUI for rails development? graphical diff, merge, etc tools for revision control? can someone recommend a good lightweight GUI for my purposes here? TIA