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

Remote Build Failing - mime-types dependency #159

Open
chrishol opened this issue Oct 30, 2013 · 15 comments
Open

Remote Build Failing - mime-types dependency #159

chrishol opened this issue Oct 30, 2013 · 15 comments

Comments

@chrishol
Copy link

Error:

/task/__gems__/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup': You have already activated mime-types 2.0, but your Gemfile requires mime-types 1.25. Using bundle exec may solve this. (Gem::LoadError)
    from /task/__gems__/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
    from /task/__gems__/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
    from /task/__gems__/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /task/__builder__.rb:45:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from __runner__.rb:213:in `<main>'

Stacktrace:

/usr/local/rvm/gems/ruby-2.0.0-p195/gems/iron_core-1.0.1/lib/iron_core/iron_logger.rb:50:in `raise_exception'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/iron_core-1.0.1/lib/iron_core/iron_logger.rb:27:in `error'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/iron_worker_ng-1.0.2/lib/iron_worker_ng/client.rb:116:in `codes_create'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/iron_worker_ng-1.0.2/lib/iron_worker_ng/client.rb:18:in `method_missing'
/Users/chrishol/code/hasty-backend/lib/tasks/iron_worker.rake:24:in `upload_worker'
/Users/chrishol/code/hasty-backend/lib/tasks/iron_worker.rake:40:in `block (5 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p195/gems/bugsnag-1.6.3/lib/bugsnag/rake.rb:27:in `block in bugsnag_define_task'
Tasks: TOP => workers:staging:upload_yelp_cacher

A new version of the mime-types gem was just released. Does this need fixing at < 2.0 for now?

@chrishol
Copy link
Author

This issue (rest-client/rest-client#240) is relevant.

@fred
Copy link

fred commented Oct 31, 2013

I cant deploy any ruby worker to Iron IO now because of this issue.
This is a serious issue.

It seems the server has mime-type 2.0 already installed.

/task/__gems__/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup': You have already activated mime-types 2.0, but your Gemfile requires mime-types 1.25. Using bundle exec may solve this. (Gem::LoadError)
    Fetching gem metadata from http://rubygems.org/.......
from /task/__gems__/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
from /task/__gems__/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from /task/__gems__/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /task/__builder__.rb:45:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from __runner__.rb:213:in `<main>'

@chrishol chrishol reopened this Oct 31, 2013
@chrishol
Copy link
Author

Yes, all of my workers that require a remote build are failing for this reason so new code uploads aren't currently possible for these.

@vreys
Copy link

vreys commented Oct 31, 2013

👍 I'm experiencing this issue with my build worker too

@rkononov
Copy link
Contributor

as a temporary solution just add following line to your .worker file

@use_local_iron_worker_ng = true

@vreys
Copy link

vreys commented Oct 31, 2013

@rkononov, @use_local_iron_worker_ng = true did the trick. Thx.

@vreys
Copy link

vreys commented Oct 31, 2013

@rkononov, the solution you provided didn't work for all of my builders. I've got the following errors:

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /task/__gems__/bin directory.
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /task/__gems__/bin directory.
Could not find gem 'ffi (= 1.9.2) ruby' in the gems available on this machine.

Here is the full backtrace: https://gist.github.com/vreys/7248018#file-gistfile1-txt

@rkononov
Copy link
Contributor

@iced could you check this one?

@fred
Copy link

fred commented Oct 31, 2013

this fix works for me, I can now deploy my ruby workers, but now I'm having another issue with params not being available.. a new BUG:

params is not set, when I try to access params on the worker, i.e: params['name']
I get error:

params['name']
undefined method `[]' for nil:NilClass 

parameters to iron worker are just fine

{
  "name": "homespace"
}

back to square 1

@vreys
Copy link

vreys commented Nov 4, 2013

Any update on this?

@treeder
Copy link
Contributor

treeder commented Nov 4, 2013

Can you guys all comment on this pull request to get the fix in? rest-client/rest-client#240

@fred
Copy link

fred commented Dec 1, 2013

Having issues with 1.25.1

/task/__gems__/gems/bundler-1.5.0.rc.1/lib/bundler/runtime.rb:34:in `block in setup': You have already activated mime-types 1.25, but your Gemfile requires mime-types 1.25.1. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
    from /task/__gems__/gems/bundler-1.5.0.rc.1/lib/bundler/runtime.rb:19:in `setup'
    from /task/__gems__/gems/bundler-1.5.0.rc.1/lib/bundler.rb:119:in `setup'
    from /task/__gems__/gems/bundler-1.5.0.rc.1/lib/bundler/setup.rb:17:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /task/__builder__.rb:45:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from __runner__.rb:213:in `<main>'

I had

gem 'mime-types', '~> 1.25'

than changing to this fixes it.

gem 'mime-types', '1.25'

Seems that there is a real problem with gems versioning on Iron ruby workers. Many gems need freezing. Is there any plans on fixing this issue for good?

@tamoyal
Copy link
Contributor

tamoyal commented Dec 1, 2013

+1 to the mime types gem versioning issue. @use_local_iron_worker_ng = true did not solve my problem

@hanchang
Copy link

hanchang commented Apr 3, 2015

I had a bunch of these issues as well, and downgrading from ruby 2.1 to ruby 1.9 as the stack solved my problem.

# your.worker
runtime "ruby"
stack "ruby-1.9"

@treeder
Copy link
Contributor

treeder commented Apr 3, 2015

Hey guys, we recommend use the new Docker based workerflow for IronWorker, gets rid of all these issues.

Blog post: http://blog.iron.io/2015/03/the-new-ironworker-development-workflow.html
Examples repo: https://github.com/iron-io/dockerworker

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

7 participants