minad/iruby — pull request #23 by fny (2014-04-25 04:14:25+00:00)
Title: Ignore existing symlink to static directory

This rescues an `Errno::EEXIST` error that occurs when `Command#create_profile` attempts to create a symlink when one already exists. I couldn't get IRuby to start otherwise.

I might take a crack at actually cleaning the code in that method once I figure out what's going on. The rescues feel a rather dirty.

Here's the relevant error trace:

```
/home/faraz/.rvm/gems/ruby-2.1.0/gems/iruby-0.1.9/lib/iruby/command.rb:90:in `symlink': File exists @ sys_fail2 - (/home/faraz/.rvm/gems/ruby-2.1.0/gems/iruby-0.1.9/lib/iruby/static, /home/faraz/.config/iruby/profile_default/static) (Errno::EEXIST)
from /home/faraz/.rvm/gems/ruby-2.1.0/gems/iruby-0.1.9/lib/iruby/command.rb:90:in `create_profile'
from /home/faraz/.rvm/gems/ruby-2.1.0/gems/iruby-0.1.9/lib/iruby/command.rb:61:in `run_ipython'
from /home/faraz/.rvm/gems/ruby-2.1.0/gems/iruby-0.1.9/lib/iruby/command.rb:17:in `run'
from /home/faraz/.rvm/gems/ruby-2.1.0/gems/iruby-0.1.9/bin/iruby:6:in `'
from /home/faraz/.rvm/gems/ruby-2.1.0/bin/iruby:23:in `load'
from /home/faraz/.rvm/gems/ruby-2.1.0/bin/iruby:23:in `

'
from /home/faraz/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
from /home/faraz/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `

'
```