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

mailcatcher failed to start #155

Closed
kforsthoevel opened this issue Aug 21, 2014 · 31 comments
Closed

mailcatcher failed to start #155

kforsthoevel opened this issue Aug 21, 2014 · 31 comments

Comments

@kforsthoevel
Copy link

Following the installation instructions I get this error on Ubuntu 12.04 and Ubuntu 14.04:

$ mailcatcher 
/opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- i18n/core_ext/string/interpolate (LoadError)
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/core_ext/string/interpolation.rb:2:in `<top (required)>'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/core_ext/string.rb:9:in `<top (required)>'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/core_ext.rb:2:in `block in <top (required)>'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/core_ext.rb:1:in `each'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/core_ext.rb:1:in `<top (required)>'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mailcatcher-0.5.12/lib/mail_catcher.rb:1:in `<top (required)>'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mailcatcher-0.5.12/bin/mailcatcher:3:in `<top (required)>'
    from /opt/rbenv/versions/2.1.2/bin/mailcatcher:23:in `load'
    from /opt/rbenv/versions/2.1.2/bin/mailcatcher:23:in `<main>'

List of installed gems:

$ gem list --local

*** LOCAL GEMS ***

activesupport (3.2.19)
bigdecimal (1.2.4)
bundler (1.6.1)
daemons (1.1.9)
eventmachine (1.0.3)
haml (4.1.0.beta.1)
i18n (0.7.0.beta1)
io-console (0.4.2)
json (1.8.1)
mail (2.6.1)
mailcatcher (0.5.12)
mime-types (2.3)
minitest (4.7.5)
multi_json (1.10.1)
psych (2.0.5)
rack (1.6.0.beta)
rack-protection (1.5.3)
rake (10.1.0)
rdoc (4.1.0)
sinatra (1.4.5)
skinny (0.2.3)
sqlite3 (1.3.9)
test-unit (2.1.2.0)
thin (1.5.1)
tilt (1.4.1)

Any ideas?

@boxheed
Copy link

boxheed commented Aug 21, 2014

I am also getting this problem on Centos 6.5. It was working fine from an install about a week ago, just wiped my vm and started again and I now get this. I'm using rvm and ruby 1.9.3. It doesn't look to me like rvm has changed so I am assuming a gem has been updated but I have no idea which one.

@g3d
Copy link

g3d commented Aug 21, 2014

Same behaviour for me. I run inside vagrant on separate gemset & ruby-1.9.3-p547.

@boxheed
Copy link

boxheed commented Aug 21, 2014

I've compared the gems between the working set and the non working set.

gem working version broken version
activesupport 3.2.19 3.2.19
bigdecimal 1.1.0 1.1.0
bundler 1.6.5 1.7.0
bundler-unload 1.0.2 1.0.2
daemons 1.1.9 1.1.9
eventmachine 1.0.3 1.0.3
executable-hooks 1.3.2 1.3.2
gem-wrappers 1.2.5 1.2.5
haml 4.1.0.beta.1 4.1.0.beta.1
i18n 0.6.11 0.7.0.beta1
io-console 0.3 0.3
json 1.5.5 1.5.5
mail 2.6.1 2.6.1
mailcatcher 0.5.12 0.5.12
mime-types 2.3 2.3
minitest 2.5.1 2.5.1
multi_json 1.10.1 1.10.1
rack 1.5.2 1.6.0.beta
rack-protection 1.5.3 1.5.3
rake 0.9.2.2 0.9.2.2
rdoc 3.9.5 3.9.5
rubygems-bundler 1.4.4 1.4.4
rvm 1.11.3.9 1.11.3.9
sinatra 1.4.5 1.4.5
skinny 0.2.3 0.2.3
sqlite3 1.3.9 1.3.9
thin 1.5.1 1.5.1
tilt 1.4.1 1.4.1

Judging from the error I would bet that it is the version of the i18n gem. I haven't tried altering the version of this yet.

@boxheed
Copy link

boxheed commented Aug 21, 2014

I can confirm it's the version of the i18n gem. I removed it and then installed the 0.6.11 version and it now works.

gem uninstall i18n
gem install i18n -v 0.6.11

@boxheed
Copy link

boxheed commented Aug 21, 2014

Quick update I've done a clean install of ruby and the broken version of the i18n gem only gets installed when I install the mailcatcher gem.

@paulbeattie
Copy link

The dependency for i18n comes from activesupport.

i18n (>= 0.6.4, ~> 0.6)

@dobermai
Copy link

This is a serious issue for us and broke our development vagrant VMs. While slightly unrelated, how can this be fixed when using RVM? We're using the following commands for installing mailcatcher:

rvm default@mailcatcher --create do gem install mailcatcher
rvm wrapper default@mailcatcher --no-prefix mailcatcher catchmail
gem install mailcatcher

I can of course manually do

gem install i18n -v 0.6.11
gem uninstall i18n -Ix --version '>0.6.11'

but this won't help with the rvm wrapper scripts. Any idea how to fix this?

@dobermai
Copy link

Just in case someone is interested, this is how I got it working with RVM:

rvm default@mailcatcher --create do gem install mailcatcher
rvm wrapper default@mailcatcher --no-prefix mailcatcher catchmail
rvm default@mailcatcher do gem install i18n -v 0.6.11
rvm default@mailcatcher do gem uninstall i18n -Ix --version '>0.6.11

@sj26
Copy link
Owner

sj26 commented Aug 27, 2014

Hey there, I didn't get a notice about this issue which is odd, sorry.

This is an odd issue. Looks like rubygems isn't doing its job properly:

irb(main):002:0> Gem.loaded_specs
=> {}
irb(main):003:0> gem "mailcatcher"
=> true
irb(main):004:0> Gem.loaded_specs
=> {"eventmachine"=>#<Gem::Specification:0x3ff8e6fcd464 eventmachine-1.0.3>, "haml"=>#<Gem::Specification:0x3ff8e6a1d0c8 haml-4.0.5>, "sqlite3"=>#<Gem::Specification:0x3ff8e6e9d2ec sqlite3-1.3.9>, "daemons"=>#<Gem::Specification:0x3ff8e6b95914 daemons-1.1.9>, "thin"=>#<Gem::Specification:0x3ff8e6e7dce4 thin-1.5.1>, "skinny"=>#<Gem::Specification:0x3ff8e6cccf6c skinny-0.2.3>, "mailcatcher"=>#<Gem::Specification:0x3ff8e69343f0 mailcatcher-0.5.12>}

(notice activesupport and i18n are missing.)

You could work around by using rvm to install mailcatcher into a dedicated gemset and make the wrapper use that, so any conflicting versions installed by other things don't conflict.

@paulbeattie
Copy link

Running RubyGems 2.2.2 on Ruby 2.1.2 I get both ActiveSupport and i18n loading. I upgraded to the latest RubyGems (2.4.1) and still get the same returned.

irb(main):001:0> Gem.loaded_specs
=> {}
irb(main):002:0> gem 'mailcatcher'
=> true
irb(main):003:0> Gem.loaded_specs
=> {"i18n"=>#<Gem::Specification:0x1edbd76eb0 i18n-0.7.0.beta1>, "multi_json"=>#<Gem::Specification:0x1edbd1401c multi_json-1.10.1>, "activesupport"=>#<Gem::Specification:0x1edbb10144 activesupport-3.2.19>, "eventmachine"=>#<Gem::Specification:0x1edbc42300 eventmachine-1.0.3>, "tilt"=>#<Gem::Specification:0x1edbcb4bd0 tilt-1.4.1>, "haml"=>#<Gem::Specification:0x1edbd8ae24 haml-4.1.0.beta.1>, "mime-types"=>#<Gem::Specification:0x1edbd2a380 mime-types-2.3>, "mail"=>#<Gem::Specification:0x1edbd70f9c mail-2.6.1>, "rack"=>#<Gem::Specification:0x1edbd0a260 rack-1.6.0.beta>, "rack-protection"=>#<Gem::Specification:0x1edbcfa2e8 rack-protection-1.5.3>, "sinatra"=>#<Gem::Specification:0x1edbce6554 sinatra-1.4.5>, "sqlite3"=>#<Gem::Specification:0x1edbb22bc8 sqlite3-1.3.9>, "daemons"=>#<Gem::Specification:0x1edbb0b7ac daemons-1.1.9>, "thin"=>#<Gem::Specification:0x1edbb1a75c thin-1.5.1>, "skinny"=>#<Gem::Specification:0x1edbcda060 skinny-0.2.3>, "mailcatcher"=>#<Gem::Specification:0x1edbd4f20c mailcatcher-0.5.12>}

@Hettomei
Copy link

Same problem here with ruby 2.1.2

For the people who start with ruby/gem and really need this one, you can install it from github :
(maybe it works for me because I have i18n (0.7.0.beta1) installed)

git  clone git@github.com:sj26/mailcatcher.git
cd mailcatcher
gem build mailcatcher.gemspec
gem install ./mailcatcher-0.6.0.gem
rbenv rehash #(if using rbenv)
mailcatcher

As said in issue #156 it comes without assets

@john-999
Copy link

john-999 commented Sep 4, 2014

+1, with:

  • Rails: 4.2.0.beta1
  • Ruby: 2.1.2p95
  • Rubygems: 2.2.2

@john-999
Copy link

john-999 commented Sep 4, 2014

For those who urgently need mails to work with Rails: 4.2.0.beta1, this worked great for me:

https://github.com/ryanb/letter_opener

@rebelwarrior
Copy link

same problem downgrading i18n fixed it.

@kwando
Copy link

kwando commented Oct 2, 2014

Had the same problem to , downgrading i18n to 0.6.11 works.

@dwenaus
Copy link

dwenaus commented Oct 28, 2014

@kwando your solution worked.

@CamJN
Copy link

CamJN commented Nov 3, 2014

Apparently this can be fixed easily, can someone make a pull request with these changes?

https://github.com/mortik/mailcatcher/commit/bdb0c9415b3ab664274b4ccc3469912b0abfcb34

@sj26
Copy link
Owner

sj26 commented Nov 5, 2014

@CamJN that won't fix the gem. To have the same effect in development mode, start mailcatcher with bundle exec mailcatcher.

CloCkWeRX added a commit to CloCkWeRX/mailcatcher that referenced this issue Nov 14, 2014
@pisaacs
Copy link

pisaacs commented Nov 15, 2014

Been using mailcatcher for while now. Removing i18n-0.7.0.beta1 worked for me!

$ gem list
.....
i18n (0.7.0.beta1, 0.6.11)
$ gem uninstall i18n

Select gem to uninstall:
 1. i18n-0.6.11
 2. i18n-0.7.0.beta1
 3. All versions
> 2
$ mailcatcher
Starting MailCatcher
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.

@esbanarango
Copy link

Thanks @pisaacs! Removing i18n-0.7.0.beta1also worked for me.

@john-999
Copy link

But it didn't for i18n-0.7.0.beta1 ;-(

@abrambailey
Copy link

Well this isn't the best solution.

funkdified@funktop ~/rails_projects/hearingtracker $ gem uninstall i18n

Select gem to uninstall:
 1. i18n-0.6.11
 2. i18n-0.7.0.beta1
 3. All versions
> 2

You have requested to uninstall the gem:
    i18n-0.7.0.beta1

activesupport-4.2.0.rc2 depends on i18n (< 0.8, >= 0.7.0.beta1)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Successfully uninstalled i18n-0.7.0.beta1
funkdified@funktop ~/rails_projects/hearingtracker $ mailcatcher
Starting MailCatcher
==> smtp://127.0.0.1:1025
==> http://127.0.0.1:1080
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.

funkdified@funktop ~/rails_projects/hearingtracker $ rails s
Could not find i18n-0.7.0.beta1 in any of the sources
Run `bundle install` to install missing gems.

So now I need to remove the gem and boot up mailcatcher.. then bundle and start my app.. Laborious!

@abrambailey
Copy link

To fix this problem, change this line in mailcatcher.rb

require 'active_support/core_ext/'

TO

require 'active_support/core_ext/object'

@AHaymond
Copy link

AHaymond commented Dec 9, 2014

+1 for @pisaacs comment. Removing the i18n-0.7.0.beta1 worked for me!

@abrambailey
Copy link

This works if you are not using 4.2.0.rc2 .. otherwise error =

activesupport-4.2.0.rc2 depends on i18n (< 0.8, >= 0.7.0.beta1)

@paulbeattie
Copy link

This works for me out the box running Ruby 2.2.0 and letting Rubygems install i18n 0.7.0. It seems that it could be related to i18n v0.7.0 going final.

@sj26
Copy link
Owner

sj26 commented Jan 17, 2015

Yep. Please remove any prerelease versions of i18n if you encounter this issue.

@bergerjac
Copy link

@CamJN the link in your comment is broken

@jondoe1337
Copy link

Still having this issue with i18n 0.7.0:

# gem install mailcatcher
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Successfully installed mailcatcher-0.6.4
Parsing documentation for i18n-0.7.0
Installing ri documentation for i18n-0.7.0
Parsing documentation for mailcatcher-0.6.4
Done installing documentation for i18n, mailcatcher after 0 seconds
2 gems installed

# mailcatcher 
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- concurrent (LoadError)
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.2.7.rc1/lib/active_support/logger_thread_safe_level.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.2.7.rc1/lib/active_support/logger.rb:3:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.2.7.rc1/lib/active_support.rb:27:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.1.0/gems/activesupport-4.2.7.rc1/lib/active_support/all.rb:1:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.1.0/gems/mailcatcher-0.6.4/lib/mail_catcher.rb:16:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.1.0/gems/mailcatcher-0.6.4/bin/mailcatcher:3:in `<top (required)>'
    from /usr/local/bin/mailcatcher:23:in `load'
    from /usr/local/bin/mailcatcher:23:in `<main>'

@sj26
Copy link
Owner

sj26 commented Jul 5, 2016

@jondoe1337 that looks like you've got activesurpport 4.2.7.rc1 installed which is causing havoc. Can you try:

gem uninstall activesupport -v 4.2.7.rc1

@jondoe1337
Copy link

That worked for me - i replaced the version above with:

gem install activesupport -v 4.2.6

Thanks!

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