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

Mina aborts during setup #91

Closed
amargherio opened this issue Feb 5, 2013 · 7 comments
Closed

Mina aborts during setup #91

amargherio opened this issue Feb 5, 2013 · 7 comments

Comments

@amargherio
Copy link

When running a mina setup --verbose, it seems like everything works appropriately, but after all of the steps are finished, I receive this in the terminal:

mina aborted!
class or module required
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:118:in `is_a?'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:118:in `ssh'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:48:in `block in run!'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:65:in `measure'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:55:in `report_time'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:48:in `run!'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/lib/mina/helpers.rb:146:in `mina_cleanup!'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/bin/mina:55:in `block (2 levels) in <top (required)>'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/bin/mina:26:in `block in <top (required)>'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/bin/mina:25:in `instance_eval'
/home/adam/.rvm/gems/ruby-1.9.3-p286/gems/mina-0.2.0/bin/mina:25:in `<top (required)>'
/home/adam/.rvm/gems/ruby-1.9.3-p286/bin/mina:19:in `load'
/home/adam/.rvm/gems/ruby-1.9.3-p286/bin/mina:19:in `<main>'
/home/adam/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
/home/adam/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

Any thoughts? I've got gem 'mina', github: 'nadarei/mina' in the Gemfile.

@killthekitten
Copy link

Did you try to bundle exec mina setup --verbose? It seems that you're sitting on 0.2.0 - your executable is outdated.

@killthekitten
Copy link

(master branch is already 0.2.1 and contains large amount of changes since 0.2.0 release)

@amargherio
Copy link
Author

I updated the Gemfile to pull directly from the Github repo, building off of master during the bundle install. This is the output when running bundle exec mina setup --verbose

bundle exec mina setup --verbose
[email protected]'s password: 
-----> Setting up /srv/www/test.com
mkdir: cannot create directory `/srv/www': Permission denied
! ERROR: Setup failed.
! Ensure that the path '/srv/www/test.com' is accessible to the SSH user.
! Try doing:
!    sudo mkdir -p "/srv/www/test.com" && sudo chown -R deploy "/srv/www/test.com"
mkdir: cannot create directory `/srv/www': Permission denied
chmod: cannot access `/srv/www/test.com/shared/log': No such file or directory
mkdir: cannot create directory `/srv/www': Permission denied
chmod: cannot access `/srv/www/test.com/shared/config': No such file or directory
touch: cannot touch `/srv/www/test.com/shared/config/database.yml': No such file or directory
bash: line 24: -----: command not found
Connection to adammargherio.com closed.

@killthekitten
Copy link

That's looks more optimistic. Did you sudo mkdir -p "/srv/www/test.com" && sudo chown -R deploy "/srv/www/test.com" as described in the output?

And I ask one more time: is there any chance to get rid of need in sudoer?

@amargherio
Copy link
Author

I think the best solution to get rid of the sudoer is to do a chown/chmod on the /srv/www directory and move it from root to deploy. That way there isn't a need for sudo. It would be the same user account for all deploys, and all deploys would take place in that directory, so there wouldn't be a need to tweak anything further down the road.

@killthekitten
Copy link

There's plenty of good articles on the web, describing this topic.

@mikong
Copy link
Member

mikong commented Jul 7, 2013

The original issue posted is resolved with bundle exec. The problem on permissions is specific to the setup. If you're having issues with automatically using sudo, there's another issue reported for this: #86.

Thanks.

@mikong mikong closed this as completed Jul 7, 2013
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

3 participants