Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running workers locally fails with LoadError on required gems #131

Open
sfcgeorge opened this issue Dec 26, 2012 · 1 comment
Open

Running workers locally fails with LoadError on required gems #131

sfcgeorge opened this issue Dec 26, 2012 · 1 comment

Comments

@sfcgeorge
Copy link

I'm using ruby 1.9.3 with latest bundler and iron_worker_ng.

I download the examples and cd into worker101, then successfully run the iron_worker install worker101 command, but then it fails on the iron_worker run worker101 command. It looks like the gems are being merged, but the require is unable to find them (locally, I'd like to get it running locally before pushing to IronWorker in the cloud).


Simons-RMBP:worker101 Simon$ iron_worker install worker101
------> Installing dependencies for code package with name='worker101'
        Found workerfile with path='worker101.worker'
        Detected exec with path='worker101.rb' and args='{}'
        Adding ruby gem dependency with name='twitter' and version='>= 0'
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Installing multipart-post (1.1.5) 
Installing faraday (0.8.4) 
Using multi_json (1.5.0) 
Installing simple_oauth (0.2.0) 
Installing twitter (4.4.2) 
Using bundler (1.2.3) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Simons-RMBP:worker101 Simon$ iron_worker run worker101
------> Creating code package
        Found workerfile with path='worker101.worker'
        Detected exec with path='worker101.rb' and args='{}'
        Adding ruby gem dependency with name='twitter' and version='>= 0'
        Code package name is 'RubyWorker101'
------> Running 'RubyWorker101'
        Fixating gems dependencies
        Merging ruby gem with name='multipart-post' and version='1.1.5'
        Merging ruby gem with name='faraday' and version='0.8.4'
        Merging ruby gem with name='multi_json' and version='1.5.0'
        Merging ruby gem with name='simple_oauth' and version='0.2.0'
        Merging ruby gem with name='twitter' and version='4.4.2'
/Users/Simon/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- twitter (LoadError)
        from /Users/Simon/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/folders/rt/vlrg8_6d22dcv3gc2vhzgzkc0000gn/T/iron-worker-ng-20121226-4835-snkuaz-container/worker101.rb:1:in `<top (required)>'
        from /Users/Simon/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /Users/Simon/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from __runner__.rb:190:in `<main>'

Another worker I'm working on has the same problem. I'm guessing it's a problem with my environment, there always seems to be something wrong with path, could that be it? I usually end up spending hours pasting stuff into .bashrc, or --force something, or rm -rf / 😉

Edit: And I had to rewrite this description as Github managed to delete it all, clearly not having a lucky code day. Very tempted to install a keylogger on myself to prevent swathes of text getting lost.
Edit 2: Third time lucky. This time I copied what I'd written before saving as, yes, Github lost it all again. Grr

@sfcgeorge
Copy link
Author

It would be really nice if I could actually use IronWorker. Updated the gem, tried again, no change. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant