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

Issue with Mailcatcher on 14.04 #312

Closed
jeremyworboys opened this issue May 10, 2014 · 21 comments
Closed

Issue with Mailcatcher on 14.04 #312

jeremyworboys opened this issue May 10, 2014 · 21 comments
Labels

Comments

@jeremyworboys
Copy link
Contributor

Just updated my project vm and ran into an issue installing Mailcatcher without RVM.

The sudo aptitude install -y libgemplugin-ruby line fails with Couldn't find any package whose name or description matched "libgemplugin-ruby"

@fideloper
Copy link
Owner

This repo is now using Ubuntu 14.04. Try 12.04 at Fideloper/vaprobash12 of
you need to stay at Ubuntu 12.04.

I'm not sure yet if 14.04 changes the install process for mail catcher yet!
(A quick google says there might not be one yet :/)

On Friday, May 9, 2014, Jeremy Worboys notifications@github.com wrote:

Just updated my project vm and ran into an issue installing Mailcatcher
without RVM.

The sudo aptitude install -y libgemplugin-ruby line fails with Couldn't
find any package whose name or description matched "libgemplugin-ruby"


Reply to this email directly or view it on GitHubhttps://github.com//issues/312
.

@jeremyworboys
Copy link
Contributor Author

Yeah, by updated my vm I meant to get 14.04.

Re-provisioning now with RVM to see if it helps.

Edit: No cigar with RVM

@jeremyworboys jeremyworboys changed the title Issue with Mailcatcher without RVM Issue with Mailcatcher on 14.04 May 10, 2014
@fideloper
Copy link
Owner

OK, thanks. We'll have to take a look!

@fideloper fideloper added the bug label May 10, 2014
@fideloper
Copy link
Owner

Issue #333 also noted a need for > 385MB memory to be assigned.

@fideloper
Copy link
Owner

#346 points out that we can install ruby1.9.1-dev to make this work. Needs testing and a PR.

@cmosguy
Copy link

cmosguy commented Jul 1, 2014

I just figured this out too, wish I saw this thread. I did a test please get this installed in your scripts :)

fideloper added a commit that referenced this issue Jul 8, 2014
@fideloper
Copy link
Owner

This is now in Master. Note that if you get a new Vagrantfile, you'll need to change the branch to "master" to get these fixes until they are turned into a point-release.

DanSmith70 added a commit to Ayima/Vaprobash that referenced this issue Jul 14, 2014
# By fideloper (15) and others
# Via fideloper (5) and Chris Fidao (3)
* 'master' of https://github.com/fideloper/Vaprobash:
  tagging stable 1.0.1
  php gpg key fix
  php5-fpm update for socket settings. does not matter 100% because they are unix socket settings instead of tcp
  fixing some apache errors
  added vagrant user to group www-data in apache install
  moved php group change to php installer assigned www-data group to user vagrant
  set run-as user for php5-fpm processes to avoid permission errors from apps writing to files
  fixing wording from last pr
  Update Comment VagrantFile
  adding ruby191dev to fix fideloper#312
  Installing the newer version
  updating apache to use mpm_event
  using mpm-event with apache2 instead of pre-fork
  First stable release! Releases will now follow semver. New features will be added in at a slower pace, with bug fixes taking priority.
  vhost assumes php. Apache remotes proxypassmatch if php/hhbm is not installed
  -qq used for installing, and consistenly applied in arg order
  redis using a ppa
  fixing couchbase PHP extension install for 5.5
@sangar82
Copy link

Vaprobash can't install Mailcatcher

==> default: >>> Installing Mailcatcher
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
==> default: Selecting previously unselected package libsqlite3-dev:amd64.
==> default: (Reading database ... 65191 files and directories currently installed.)
==> default: Preparing to unpack .../libsqlite3-dev_3.8.2-1ubuntu2_amd64.deb ...
==> default: Unpacking libsqlite3-dev:amd64 (3.8.2-1ubuntu2) ...
==> default: Selecting previously unselected package ruby1.9.1-dev.
==> default: Preparing to unpack .../ruby1.9.1-dev_1.9.3.484-2ubuntu1_amd64.deb ...
==> default: Unpacking ruby1.9.1-dev (1.9.3.484-2ubuntu1) ...
==> default: Setting up libsqlite3-dev:amd64 (3.8.2-1ubuntu2) ...
==> default: Setting up ruby1.9.1-dev (1.9.3.484-2ubuntu1) ...
==> default: Building native extensions.  This could take a while...
==> default: ERROR:  Error installing mailcatcher:
==> default:    ERROR: Failed to build gem native extension.
==> default: 
==> default:         /usr/bin/ruby1.9.1 extconf.rb
==> default: checking for main() in -lssl... no
==> default: checking for rb_trap_immediate in ruby.h,rubysig.h... no
==> default: checking for rb_thread_blocking_region()... yes
==> default: checking for inotify_init() in sys/inotify.h... yes
==> default: checking for writev() in sys/uio.h... yes
==> default: checking for rb_wait_for_single_fd()... yes
==> default: checking for rb_enable_interrupt()... yes
==> default: checking for rb_time_new()... yes
==> default: checking for sys/event.h... no
==> default: checking for epoll_create() in sys/epoll.h... yes
==> default: creating Makefile
==> default: 
==> default: make
==> default: compiling binder.cpp
==> default: make: g++: Command not found
==> default: make: *** [binder.o] Error 127
==> default: 
==> default: 
==> default: Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-1.0.3 for inspection.
==> default: Results logged to /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/ext/gem_make.out
==> default: update-rc.d: warning: /etc/init.d/cron missing LSB information
==> default: update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
==> default:  Adding system startup for /etc/init.d/cron ...
==> default:    /etc/rc0.d/K20cron -> ../init.d/cron
==> default:    /etc/rc1.d/K20cron -> ../init.d/cron
==> default:    /etc/rc6.d/K20cron -> ../init.d/cron
==> default:    /etc/rc2.d/S20cron -> ../init.d/cron
==> default:    /etc/rc3.d/S20cron -> ../init.d/cron
==> default:    /etc/rc4.d/S20cron -> ../init.d/cron
==> default:    /etc/rc5.d/S20cron -> ../init.d/cron
==> default: php5-fpm stop/waiting
==> default: php5-fpm start/running, process 16057
==> default:  * Restarting web server apache2
==> default:    ...done.
==> default: /usr/bin/env: unrecognized option '--ip=0.0.0.0'
==> default: Try '/usr/bin/env --help' for more information.

Thanks @fideloper !!! Vaprobash is awesome!

Edit: This can help sj26/mailcatcher#144

@fideloper
Copy link
Owner

Hi!
So Vapro installs ruby 1.9.1-dev, but there's the ruby2.0-dev package available to try as well.

@LimeBlast - Any info on updates to mailcatcher for ubuntu 14.04? Have you tried it out? I'm not 100% sure on the best way to jump in with this as it uses RVM to install (if RVM is available) - the linked bug for mailcatcher above suggests using RVM to install ruby 2.1+ for use with Mailcatcher.

@LimeBlast
Copy link
Contributor

Sorry @fideloper, I've not looked at it on 14.04.

Seeing as RVM is a requirement for mailcatcher, which needs Ruby 2.1, are you not able to just make sure that the Mailcatcher script installs RVM, and Ruby 2.1, regardless of what else might be going on?

@fideloper
Copy link
Owner

Thanks for the quick reply!

Is RVM a requirement or just a convenient way to get a newer Ruby version?

RVM is a separate install here, but perhaps I can make it a requirement if Mailcatcher is used as well.

@fideloper
Copy link
Owner

@sangar82 I suggest installing RVM and Mailcatcher packages in a NEW Vaprobash server and see if that works for you!

@LimeBlast
Copy link
Contributor

Well, in truth, it's of course Ruby which is the requirement for Mailcatcher, but as you've got an RVM script as part of Vaprobash, I'd say make it a requirement for the end user - i.e. if you want Mailcatcher, you have to run the RVM install script. If you don't, bad things will happen ;)

@fideloper
Copy link
Owner

That works for me, I'll see if RVM+Mailcatcher "just works" and if so, that can be that 👍

Thanks again

@sangar82
Copy link

sangar82 commented Sep 1, 2014

Yeah! Now is working!

I left a question: it may be better to install ruby-dev instead of ruby1.9-dev?
Because now I have installed ruby 2.1.

Thanks!!!

@fideloper
Copy link
Owner

Did you use ruby-dev package or RVM?

Thanks

On Mon, Sep 1, 2014 at 5:35 PM, Iván Sanchez notifications@github.com
wrote:

Yeah! Now is working!

I left a question: it may be better to install ruby-dev this instead of
ruby1.9-dev?
Because now I have installed ruby 2.1.

Thanks!!!


Reply to this email directly or view it on GitHub
#312 (comment).

@sangar82
Copy link

sangar82 commented Sep 1, 2014

Haha.. I used a combo..

I uncomment this line

config.vm.provision "shell", path: "#{github_url}/scripts/rvm.sh", privileged: false, args: ruby_gems.unshift(ruby_version)

and this:

config.vm.provision "shell", path: "#{github_url}/scripts/mailcatcher.sh"

What i said before is this (scripts/mailcatcher.sh):

sudo apt-get install -qq libsqlite3-dev ruby1.9.1-dev

because I think ruby-dev is required for Mailcatcher

@sangar82
Copy link

sangar82 commented Sep 2, 2014

I installed a new VM yesterday. After doing a vagrant halt and vagrant up (I need to restart my machine) Mailcatcher doesn't work. Before the vagrant halt, Mailcatcher was working fine.

This is the log:

vagrant@vaprobash:~$ mailcatcher
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find mailcatcher (>= 0) amongst [bundler-1.7.2, bundler-unload-1.0.2, executable-hooks-1.3.2, gem-wrappers-1.2.5, rubygems-bundler-1.4.4, rvm-1.11.3.9] (Gem::LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
    from /usr/local/bin/mailcatcher:22:in `<main>'

Thanks Chris!!

@fideloper
Copy link
Owner

I'd guess that this has to do with installing with RVM - you may need to re-initialize that ruby environment created when installing mailcatcher.

RVM creates environments and you might just need to switch "into" them on restart. Check out the docs: http://rvm.io/rvm/basics

I'd try running rvm list and then rvm use 2.1.1, adjusting for whatever version or tag is listed in the results of the rvm list call.

Otherwise I'm not really sure, as I'm not a ruby person.

Last note:

Halt doesn't restart, it just suspends. Vagrant commands "down" and "up" will restart, "halt" and "resume" will suspend and resume.

@LimeBlast
Copy link
Contributor

Back when I was playing around with mailcatcher, I noticed there were some issues with making it start automatically after a vagrant halt and a vagrant up. I avoided this myself by just using vagrant suspend.

@sangar82
Copy link

sangar82 commented Sep 2, 2014

Perhaps the solution is create a gemset, and install mailtcatcher in this gemset.

rvm use 1.9.3
rvm gemset create "gemset_name"
use 1.9.3@gemset_name

gem install mailcatcher

Something like this??

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

No branches or pull requests

5 participants