# Windows + linux?

**URL:** <https://www.ruby-forum.com/t/windows-linux/110585>\
**Category:** Rails\
**Created:** [July 27, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/windows-linux/110585 "2007-07-27T21:00:40Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/1 "2007-07-27T21:00:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/2 "2007-07-27T21:29:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/3 "2007-07-27T21:41:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/4 "2007-07-27T22:21:51Z")

</div>

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/](http://www.oreilly.com/catalog/9780596510657/)  
^ assert\_xpath  
[O'Reilly Media - Technology and Business Training](http://tinyurl.com/23tlu5) ← assert\_raise\_message

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/5 "2007-07-27T22:43:53Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 10:49pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/6 "2007-07-27T22:49:55Z")

</div>

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/](http://www.oreilly.com/catalog/9780596510657/)  
^ assert\_xpath  
[O'Reilly Media - Technology and Business Training](http://tinyurl.com/23tlu5) ← assert\_raise\_message

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 11:33pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/7 "2007-07-27T23:33:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 28, 2007, 2:53pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/8 "2007-07-28T14:53:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 27, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/9 "2007-07-27T23:21:00Z")

</div>

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 [1].

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.

[1] [http://sourceforge.net/projects/xming](http://sourceforge.net/projects/xming)

Cheers

Stefan

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 29, 2007, 2:44am UTC](https://www.ruby-forum.com/t/windows-linux/110585/10 "2007-07-29T02:44:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 29, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/11 "2007-07-29T13:02:41Z")

</div>

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](http://www.nedforce.nl)

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 29, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/12 "2007-07-29T19:58:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ming](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@ming](https://www.ruby-forum.com/u/ming)\
**Post date:** [July 28, 2007, 3:16pm UTC](https://www.ruby-forum.com/t/windows-linux/110585/13 "2007-07-28T15:16:22Z")

</div>

What about running a complete Linux system inside VMWare workstation ?
