# Windows Client/Linux Server IDE for Ruby?

**URL:** <https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331>\
**Category:** Ruby\
**Created:** [April 20, 2006, 5:48pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331 "2006-04-20T17:48:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 20, 2006, 5:48pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/1 "2006-04-20T17:48:48Z")

</div>

I presently use ssh & vi to program in ruby/rails, typically from a  
remote location on my WinXPpro laptop to a CentOS-4.3 Linux development  
box. I have not in the past used any IDE for anything more than casual  
testing of the software itself. However, having recently viewed the  
QT.mov on Rails Migrations I found myself desiring the inline ruby/rails  
code completion facility displayed by the editor used in that video.  
However, I need to be able to run the editor locally on an XPpro but  
work on files and projects stored remotely on a Linux machine.

Does software exist that provides this functionality for Ruby/Rails? If  
so, what is it called and where do I get it? Or, can the inline code  
completion facility be added to vi(m)?

Regards,  
Jim

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 20, 2006, 6:37pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/2 "2006-04-20T18:37:41Z")

</div>

James B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> However, I need to be able to run the editor locally on an XPpro but  
> work on files and projects stored remotely on a Linux machine.

I believe Emacs with Tramp will give you that capability, if vi hasn’t  
poisoned your mind against Emacs. =) Tramp allows you to edit files  
over SFTP transparently.

For Ruby-specific coding, be sure to grab ruby-mode, which comes with  
the standard Ruby distribution, I think. You can set up some pretty  
nifty code completion using the snippets.el library[1].

For Rails-specific coding, you can try rails.el[2] for a “large and in  
charge” environment (lots of features, kind of chaotic IMHO) or  
arorem.el[3] for a more focused, minimalist approach.

RI for Emacs[4] is also really handy for documentation lookup. If you  
generate ri docs for all your installed gems (as mentioned in a  
previous thread) you can also use this for Rails and other gem  
libraries.

The great thing about this setup is that it’s all cross-platform, you  
can use it in your current situation, but you can stick with it if you  
migrate to GNU/Linux or a Mac.

-Phil H.

[1] - [http://cryptocracy.hh.org/~cartel/elisp/snippet.el](http://cryptocracy.hh.org/~cartel/elisp/snippet.el)  
[2] - [http://rubyforge.org/projects/emacs-rails/](http://rubyforge.org/projects/emacs-rails/)  
[3] - [http://dev.technomancy.us/phil/wiki/arorem](http://dev.technomancy.us/phil/wiki/arorem)  
[4] - [http://rubyforge.org/projects/ri-emacs/](http://rubyforge.org/projects/ri-emacs/)

(If you can’t find any of the files mentioned above, all of them  
except rails.el are in my dotfiles archive:  
[http://dev.technomancy.us/phil/browser/dotfiles/.emacs.d](http://dev.technomancy.us/phil/browser/dotfiles/.emacs.d))

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 20, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/3 "2006-04-20T20:50:37Z")

</div>

James B. wrote:

> I presently use ssh & vi to program in ruby/rails, typically from a  
> remote location on my WinXPpro laptop to a CentOS-4.3 Linux development  
> box. I have not in the past used any IDE for anything more than casual  
> testing of the software itself. However, having recently viewed the  
> QT.mov on Rails Migrations I found myself desiring the inline ruby/rails  
> code completion facility displayed by the editor used in that video.  
> However, I need to be able to run the editor locally on an XPpro but  
> work on files and projects stored remotely on a Linux machine.

Can you mount the remote directory as a local drive (by whatever that  
mechanism is that Win2K/WinXP offers), and have the editor treat the  
files as if they were local?

–  
James B.

[http://www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[Ruby Code & Style](http://www.artima.com/rubycs/) - The Journal By & For Rubyists  
[http://www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[http://yourelevatorpitch.com](http://yourelevatorpitch.com) - Finding Business Focus

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 20, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/4 "2006-04-20T22:26:33Z")

</div>

Textmate. Have you seen this product for vi(m):

[http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html](http://blog.hasno.info/blog/segfault/dev/2006/04/10/vim-7-ruby-omni-completion.html)

There’s been a big thread on it the past couple of days.

Michael

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 20, 2006, 9:47pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/5 "2006-04-20T21:47:21Z")

</div>

Phil H. wrote:

> James B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> I believe Emacs with Tramp will give you that capability, if vi hasn’t  
> poisoned your mind against Emacs. =) Tramp allows you to edit files  
> over SFTP transparently.

Having started with TECO (the pre-cambrian forebearer of EMACS) on a  
VT-52 and later graduating to EDI and then EDT on VT-100s, my mind was  
poisoned long before I ran into vi(m). That said, I am loath to learn  
yet another editor unless I have a strong motive. Hoowever, inline  
completion of API methods is a compelling argument to change if  
necessary. I take it that there is no possiblity of obtaining this  
functionality for Ruby/Rails in vim?

Do you happen to know what editor and options DHH was using when he did  
the Migrations video tutorial?

Regards,  
Jim

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 20, 2006, 11:55pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/6 "2006-04-20T23:55:33Z")

</div>

On 4/20/06, James B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Phil H. wrote:  
> [snip]  
> That said, I am loath to learn  
> yet another editor unless I have a strong motive. Hoowever, inline  
> completion of API methods is a compelling argument to change if  
> necessary. I take it that there is no possiblity of obtaining this  
> functionality for Ruby/Rails in vim?

There is no funky autocompletion in textmate, afaik, beyond completion  
from open files, which vim already does. What you are seing in the  
video are textmate snippets and there are at least two attempts to get  
similar functionality in vim:

- snippetsEmu  
[Error : vim online](http://www.vim.org/scripts/script.php?script_id=1318)

- snippetMagic  
[http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02](http://blog.rosejn.net/articles/2006/02/28/snippetmagic-0-02)

I use XP and I had snippetMaginc working at some point and it’s quite  
decent. The snippets were actually converted to yaml form the textmate  
repository.

As for editing files remotely, vim is supposed to be able to do it but  
I had some problems.  
At first, netrw was trying to quote something using single quotes, had  
to change that to double quotes.  
file, netrw, changed line 545 to:  
exe g:netrw\_silentxfer.“!”.g:netrw\_scp\_cmd.useport."  
“”“.g:netrw\_machine.”:“.escape(b:netrw\_fname,’ ?&').”“” ".tmpfile

Then, I was able to open a remote file like this:  
:let g:netrw\_scp\_cmd = “pscp -q” (that’s pscp from putty in my PATH)  
:e scp://[username]@[host]/[/path/to/file]

Unfortunately, saving the file back doesn’t work and I gave up after  
trying to debug it for a while.  
In case anyone wants to try to make this final step work, the error is  
produced by line 797 in netrw.vim:  
echohl Error | echo “_ **netrw** _ your  
“.substitute(tmpfile,‘[^/]+$’,‘’,‘e’).” directory is missing!”

It complains that it can’t find the temp directory but it seems to  
ignore the \_vimrc setting for it.

This probably has a simple fix. However, I’m quite tired and can’t be  
bothered to track this down right now. But please post the solution if  
you can make it work.

btw:  
:version  
VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 3, compiled Mar 4 2006  
09:40:47)  
MS-Windows 32 bit GUI version with OLE support  
Compiled by removed\_email\_address@domain.invalid

> Regards,  
> Jim
> 
> –

Happy huntin’

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 21, 2006, 12:26am UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/7 "2006-04-21T00:26:42Z")

</div>

James B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Having started with TECO (the pre-cambrian forebearer of EMACS) on a  
> VT-52 and later graduating to EDI and then EDT on VT-100s, my mind was  
> poisoned long before I ran into vi(m). That said, I am loath to learn  
> yet another editor unless I have a strong motive.

Just think of it as an excuse to learn more Lisp! (That’s a great  
motive for me, but I guess not everyone is as crazy as I am. I do find  
it quite rewarding, though, and you can’t beat the flexibility.)

> However, inline completion of API methods is a compelling argument  
> to change if necessary. I take it that there is no possiblity of  
> obtaining this functionality for Ruby/Rails in vim?

I don’t think the autocomplete is what vim is lacking but rather the  
transparent sftp editing. You may be able to add that functionality; I  
haven’t really looked into it.

-Phil

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 21, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/8 "2006-04-21T17:46:04Z")

</div>

Phil H. wrote:

> Just think of it as an excuse to learn more Lisp! (That’s a great  
> motive for me, but I guess not everyone is as crazy as I am. I do find  
> it quite rewarding, though, and you can’t beat the flexibility.)

I choose not to comtemplate that possiblity. I am sure that you  
understand.

> I don’t think the autocomplete is what vim is lacking but rather the  
> transparent sftp editing. You may be able to add that functionality; I  
> haven’t really looked into it.

I just built vim70e and I am waiting for the next releasae of the  
vim-ruby gem, due out today, which is supposed to contain the ruby/rails  
autocomplete vim add-in. I will see about sftp later. For now, if  
vim70 will auto-complete ruby/rails api calls then working on the host  
over ssh is no hardship.

I suppose that I will probably find that satisfying this desire proves  
far less usful than I imagined. I have found that the essental Ruby and  
Rails APIs are far easier to keep in mind than many of the other  
languagues I have had to deal with. But I sometimes find that  
auto-complete functions reveal calls that are new to me and, given the  
recent spate of updates to Rails, such clues might prove useful.

Jim

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [April 21, 2006, 12:08am UTC](https://www.ruby-forum.com/t/windows-client-linux-server-ide-for-ruby/58331/9 "2006-04-21T00:08:13Z")

</div>

I use Notepad2 or jEdit from WinSCP.
