This repository was archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
This repository was archived by the owner on Dec 22, 2023. It is now read-only.
OSX/rvm error on first call to consular (undefined method `do_script' for nil:NilClass) #95
Copy link
Copy link
Open
Description
I'm using rvm on OSX Lion. I use a very simple bash script that runs a consular termfile, and I frequently encounter a NoMethodError in consular/osx.rb the first time I attempt to run this bash script. If I run the bash script a second time, then things proceed normally, which leads me to believe there is some kind of race condition in setting up the Ruby environment, possibly related to rvm.
What's tricky is that I never have any issues running other Ruby scripts via rvm...I've only ever seen this when running a consular script after boot-up.
I don't think it's the cause of any issues, but the bash script I use looks like this:
#!/bin/bash
RAILSBOX_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $RAILSBOX_DIR && RAILSBOX_DIR=$RAILSBOX_DIR consular start
The subsequent Ruby error and callstack is as follows:
/Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:161:in `execute_command': undefined method `do_script' for nil:NilClass (NoMethodError)
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:110:in `block (2 levels) in execute_window'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:110:in `each'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:110:in `block in execute_window'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:95:in `each'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:95:in `execute_window'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:63:in `block in process!'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:63:in `each_pair'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-osx-1.0.1/lib/consular/osx.rb:63:in `process!'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-1.0.2/lib/consular/cli.rb:35:in `block in start'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-1.0.2/lib/consular/cli.rb:255:in `call'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-1.0.2/lib/consular/cli.rb:255:in `message_unless_file'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-1.0.2/lib/consular/cli.rb:35:in `start'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.15.2/lib/thor/task.rb:27:in `run'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.15.2/lib/thor/invocation.rb:120:in `invoke_task'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.15.2/lib/thor.rb:275:in `dispatch'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.15.2/lib/thor/base.rb:408:in `start'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/gems/consular-1.0.2/bin/consular:13:in `<top (required)>'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/bin/consular:19:in `load'
from /Users/jeffomatic/.rvm/gems/ruby-1.9.2-p290/bin/consular:19:in `<main>'
Metadata
Metadata
Assignees
Labels
No labels