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

Unable to start mailcatcher #262

Closed
liquid1982 opened this issue Jan 18, 2016 · 8 comments
Closed

Unable to start mailcatcher #262

liquid1982 opened this issue Jan 18, 2016 · 8 comments

Comments

@liquid1982
Copy link

I'm having some problems with Ruby 2.2.3 and Mailcatcher (both from github master and from the latest released version). Here's the error log:

/Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:114:in `require': unable to find a version of 'sinatra' to activate (Gem::LoadError)
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mailcatcher-0.6.2/lib/mail_catcher/web/application.rb:5:in `<top (required)>'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mailcatcher-0.6.2/lib/mail_catcher/web.rb:4:in `<top (required)>'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mailcatcher-0.6.2/lib/mail_catcher.rb:20:in `<top (required)>'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/vincenzo/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mailcatcher-0.6.2/bin/mailcatcher:3:in `<top (required)>'
        from /Users/vincenzo/.rbenv/versions/2.2.3/bin/mailcatcher:23:in `load'
        from /Users/vincenzo/.rbenv/versions/2.2.3/bin/mailcatcher:23:in `<main>'

I found something on Google – it looks like is a i18n gem related issue. Anyone getting the same error on this Ruby version?

@sj26
Copy link
Owner

sj26 commented Jan 31, 2016

If you're running mailcatcher from github you'll need to bundle install. Make sure you git pull origin master first. Does that fix your issue?

@tobinibot
Copy link

I’m having this problem with mailcatcher, and I installed it as a gem (fresh install, too). I’d be happy to supply more details if need be.

$ gem install mailcatcher
Fetching: mailcatcher-0.6.3.gem (100%)
Successfully installed mailcatcher-0.6.3
1 gem installed

$ mailcatcher 
/usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:113:in `require': unable to find a version of 'sinatra' to activate (Gem::LoadError)
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mailcatcher-0.6.3/lib/mail_catcher/web/application.rb:5:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mailcatcher-0.6.3/lib/mail_catcher/web.rb:4:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mailcatcher-0.6.3/lib/mail_catcher.rb:20:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
    from /usr/local/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mailcatcher-0.6.3/bin/mailcatcher:3:in `<top (required)>'
    from /usr/local/opt/rbenv/versions/2.3.0/bin/mailcatcher:22:in `load'
    from /usr/local/opt/rbenv/versions/2.3.0/bin/mailcatcher:22:in `<main>'

$ gem list

*** LOCAL GEMS ***

actioncable (5.0.0.beta1)
…
sinatra (1.4.6, 1.4.4)
sinatra-asset-pipeline (0.7.0, 0.4.0)
sinatra-contrib (1.4.6, 1.4.2)
…
websocket-driver (0.6.3)
websocket-extensions (0.1.2)

@oelmekki
Copy link

oelmekki commented Feb 3, 2016

Same for me, mailcatcher stopped working from gem, even after updating it
and making sure to have sinatra installed and up to date.

Running mailcatcher from latest master (to date) indeed works, provided
it is executed within bundler:

$ git clone https://github.com/sj26/mailcatcher.git
$ cd mailcatcher
$ bundle
$ bundle exec ./bin/mailcatcher -f

EDIT: but then, it fails to load js and css. Same when checking out
v0.6.2. No solution, sorry :)

@sj26
Copy link
Owner

sj26 commented Feb 3, 2016

I think this is because rubygems is terrible.

I managed to replicate this by installing rails beta (have you done that too?) then installing mailcatcher and running mailcatcher. Thin quite happily activates rack-2.0.0.alpha (installed by rails 5), but sinatra requires "~> 1.5", hence why it can't activate and load sinatra.

Rubygems doesn't seem to lock activates gems dependencies before they're required. Mailcatcher explicitly specifies which gems it needs, and what versions they should be. Rubygems should be able to resolve a working set from these. But I guess it can't, and that's why we invented Bundler.

Argh.

@sj26
Copy link
Owner

sj26 commented Feb 4, 2016

Right. So I've made mailcatcher explicitly activate its gem dependencies. Please install 0.6.4 and see if it solves your issues.

@liquid1982
Copy link
Author

@sj26 it worked! thank you so much!

@sj26 sj26 closed this as completed Feb 4, 2016
@NullVoxPopuli
Copy link

I'me having this problem. how do I fix it?

$ gem install mailcatcher -v 0.6.4
Fetching: mailcatcher-0.6.4.gem (100%)
Successfully installed mailcatcher-0.6.4
Parsing documentation for mailcatcher-0.6.4
Installing ri documentation for mailcatcher-0.6.4
Done installing documentation for mailcatcher after 0 seconds
1 gem installed
$ mailcatcher
/home/me/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x10d180c mailcatcher-0.6.4> (NoMethodError)

here is my rvm info:


$ rvm info

ruby-2.3.0@aeonvera:

  system:
    uname:       "Linux Orithyia 4.0.0-040000-generic #201504121935 SMP Sun Apr 12 23:36:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux"
    system:      "ubuntu/15.04/x86_64"
    bash:        "/bin/bash => GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.26.9 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "1 year 2 months 2 days 9 hours 30 minutes 50 seconds ago"
    path:         "/home/me/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.3.0p0"
    date:         "2015-12-25"
    platform:     "x86_64-linux"
    patchlevel:   "2015-12-25 revision 53290"
    full_version: "ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]"

  homes:
    gem:          "/home/me/.rvm/gems/ruby-2.3.0@aeonvera"
    ruby:         "/home/me/.rvm/rubies/ruby-2.3.0"

  binaries:
    ruby:         "/home/me/.rvm/rubies/ruby-2.3.0/bin/ruby"
    irb:          "/home/me/.rvm/rubies/ruby-2.3.0/bin/irb"
    gem:          "/home/me/.rvm/rubies/ruby-2.3.0/bin/gem"
    rake:         "/home/me/.rvm/gems/ruby-2.3.0@aeonvera/bin/rake"

  environment:
    PATH:         "/home/me/.rvm/gems/ruby-2.3.0@aeonvera/bin:/home/me/.rvm/gems/ruby-2.3.0@global/bin:/home/me/.rvm/rubies/ruby-2.3.0/bin:/home/me/.rvm/bin:/home/me/.nvm/versions/node/v4.3.1/bin:/usr/lib/ccache:/usr/local/heroku/bin:/home/me/apps/phantomjs/bin:/home/me/scripts/system-utils:/home/me/scripts/rails:/home/me/scripts:/usr/lib/ccache:/usr/local/heroku/bin:/home/me/apps/phantomjs/bin:/home/me/scripts/system-utils:/home/me/scripts/rails:/home/me/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/me/Development/ardupilot/Tools/autotest:/usr/local/lib/python2.7/dist-packages/MAVProxy:/usr/local/lib/python2.7/dist-packages/pymavlink/examples:/home/me/Development/jsbsim/src:/home/me/Development/ardupilot/Tools/autotest:/usr/local/lib/python2.7/dist-packages/MAVProxy:/usr/local/lib/python2.7/dist-packages/pymavlink/examples:/home/me/Development/jsbsim/src"
    GEM_HOME:     "/home/me/.rvm/gems/ruby-2.3.0@aeonvera"
    GEM_PATH:     "/home/me/.rvm/gems/ruby-2.3.0@aeonvera:/home/me/.rvm/gems/ruby-2.3.0@global"
    MY_RUBY_HOME: "/home/me/.rvm/rubies/ruby-2.3.0"
    IRBRC:        "/home/me/.rvm/rubies/ruby-2.3.0/.irbrc"
    RUBYOPT:      ""
    gemset:       "aeonvera"


@sj26
Copy link
Owner

sj26 commented Apr 10, 2016

@NullVoxPopuli please see #267.

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

5 participants