-
Get a monthly update on best practices for delivering successful software.
Not exactly Ajax related, but I thought I'd share it since it might prove useful. I've been evaluating a few Rails IDE's for my firms lately, including IntelliJ IDEA 7.0. On Linux, it has been an underwhelming experience. Specifically, there are two problems that get in the way of productive work:
/usr/local/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /usr/bin/rails ProjectName --force, which is a problem if rails is a shell script, as it is on many system.vendor/rails to . causes the IDE to go into an infinite recursive scan of the ruby code.Yuck.
The solution to the first problem is to provide a Ruby wrapper to the rails shell script. First you move /usr/bin/rails to /usr/bin/rails.sh. Then you create a new /usr/bin/rails with the following content:
#!/usr/bin/ruby
exec('/usr/bin/rails.sh', *ARGV);
Now, when the IDE tries to execute Rails with the Ruby runtime, it doesn't barf. So far so good.
The second problem doesn't have such a simple solution. Since the IDE starts scanning the source tree right after Rails gets done generating it, you don't have a chance to fix things before the death spiral begins. So, our hack is to first delete the symbolic link, then exclude it from the source scan, then re-add it when it is safe.
cd vendor; rm railsmkdir railsvendor/rails directory and exclude it. Click OK.
rmdir rails; ln -s . railsAnd you are done. Double yuck. What a hack.
JetBrains, are you listening? Since many Rails developers use Linux as their desktop platform, maybe you could fix these issues soon? This ain't like IE on the Mac, people actually do use it.
Technorati Tags: ruby, rails, ide, intellij
Related posts:
Topics: IDE, Ruby on Rails
Please comment the issue http://www.jetbrains.net/jira/browse/RUBY-385 and describe your environment(rails and ruby versions, plugin version, OS). What version of Rails do you use? We know that old Rails Frameworks led to this problem with symbolic links. But on version 1.2.3 and higher all is ok.
Comment by Roman Chernyatchik, Friday, November 16, 2007 @ 12:48 am