Coder Social home page Coder Social logo

andreychernih / railsbox Goto Github PK

View Code? Open in Web Editor NEW
318.0 13.0 54.0 608 KB

Fast and easy Ruby on Rails virtual machines

Home Page: https://railsbox.io

License: MIT License

Ruby 55.29% CoffeeScript 6.13% JavaScript 0.60% CSS 1.49% HTML 30.48% Shell 0.46% Python 0.73% Go 4.82%
ansible nginx ruby ruby-on-rails vagrant

railsbox's Introduction

Build Status Code Climate Test Coverage

railsbox is Ruby on Rails virtual machine configurator. You can quickly create virtual machine for development and production environments using this tool. Mac OS X, Linux and Windows host machines are supported.

Requirements

You will need VirtualBox, vagrant and ansible to bootstrap new machine using configuration created by this utility. ansible is not required for Windows, railsbox will use shell scripts to install and run ansible inside guest machine.

What's included

Operating systems

You can choose between Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. Base boxes provided by vagrantcloud. You can also deploy to your remote server using SSH connection. railsbox will create 2 scripts:

  • provision.sh - which will install and configure all required software
  • deploy.sh - which will deploy latest code from the GIT repo

Ruby versions

It's possible to install Ruby either with rvm, rbenv or using brightbox apt repository.

Application server

Supported servers are:

Databases

It's possible to install the following databases:

  • PostgreSQL
  • MySQL
  • MongoDB
  • redis

Background jobs

  • sidekiq
  • resque
  • delayed_job

vim

vim-sensible and vim-rails are automatically installed.

Future plans

railsbox is constantly improving. The following is in our TODO list for future releases:

  • Add ability to deploy to various platforms supported by vagrant - Parallels, VMWare, EC2
  • Add additional server options (Passenger, thin)
  • Add memcached
  • Add elasticsearch
  • Add MariaDB
  • Add CouchDB
  • Add SMTP server

Contributing

All kind of contributions are always welcomed.

License

railsbox is licensed under the MIT license.

railsbox's People

Contributors

a-chernykh avatar acorncom avatar arifb avatar eavonius avatar edgarortegaramirez avatar kraft001 avatar mikeastock avatar tmaier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

railsbox's Issues

Install ruby with rvm (--binary flag)

If rvm doesn't have the binary package for selected version of ruby, vagrant provision failed with error.

stderr: Requested binary installation but no rubies are available to download, consider skipping --binary flag.
stdout: Searching for binary rubies, this might take some time.

Postgres sudo

TASK [postgresql : Create postgresql user] *************************************
fatal: [....]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "parsed": false}

any idea what i'm missing?

- name: Create postgresql user
  postgresql_user: name={{ postgresql_db_user }} password={{ postgresql_db_password }} role_attr_flags=CREATEDB,SUPERUSER,CREATEROLE
  sudo_user: '{{ postgresql_admin_user }}'

thanks

Vagrant reboot deletes puma pids and sockets folder from /tmp directory

While using the setup works perfectly fine on first provisioning, as soon as I do vagrant halt and start the machine again by doing vagrant up, I can't seem to get puma working. I've looked into the log files and the issue is that the pids and sockets directory from /tmp/project-name folder are missing. Actually, the whole /tmp/project-name folder is missing on subsequent boots.

Is this something that I can solve on my own?

Hash Sum mismatch issue caused Unable to fetch some archives

I try to vagrant up with thif config on my Windows PC.
And run into such kind of problem:

msg: 'apt-get install 'autoconf' 'bison' 'build-essential' 'libssl-dev' 'libyaml-dev' 'libreadline6-dev' 'zlib1g-dev' 'libncurses5-dev' 'nodejs' 'python-pip' 'python-dev' 'htop' 'git'' failed: E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/automake-1.14/automake_1.14.1-2ubuntu1_all.deb Hash Sum mismatch

Is this due to my network issue? I tried this in my school serveral times and failed.

This is my console log.

An error at installation of the unicorn.

TASK: [unicorn | Install unicorn] *********************************************
failed: [myapp] => {"changed": true, "cmd": ["/bin/bash", "-l", "-c", "gem install unicorn --no-ri --no-rdoc"], "delta": "0:00:30.377230", "end": "2015-01-14 11:19:04.382591", "rc": 1, "start": "2015-01-14 11:18:34.005361", "warnings": []}
stderr: ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /var/lib/gems/1.9.1 directory.

FATAL: all hosts have already failed -- aborting

Use this rails box.
https://railsbox.io/boxes/1cbaeb0afd93

Sidekiq fails to include Redis

When selecting SideKiq it should probably also include installing redis as well since that's the default. After a while I realized there is an option to install redis as an ORM however i wasn't aware of that option so I guess the real issue here is to make redis automatic with sidekiq if it isn't already available in the instance somewhere.

Puma not creating PID or Socket

Configuration at https://railsbox.io/boxes/0e2a475a6b52

Running this on an Ubuntu 12 host.

When the box boots, everything starts up but puma doesn't actually create the socket file or the pid file. The vagrant user has permissions on the tmp directory so I'm not sure what's going on. Nothing crazy showing up in syslog either.

Any ideas? I'm not sure where else to investigate at this point.

Ansible errors

I'm getting the this error on many tasks
One or more undefined variables: the inline if-expression on line 1 evaluated to false and no else section was defined

Firstly appears on

TASK: [postgresql | Assure that config dir exists]
fatal: [127.0.0.1] => One or more undefined variables: the inline if-expression on line 1 evaluated to false and no else section was defined.

If I delete that task then the same error appears on

TASK: [base |  Create temp directory]
fatal: [127.0.0.1] => One or more undefined variables: the inline if-expression on line 1 evaluated to false and no else section was defined.

Again, if I delete that task too, the same error appears on

TASK: [ruby | bundle install]
fatal: [127.0.0.1] => One or more undefined variables: the inline if-expression on line 1 evaluated to false and no else section was defined.

And so on:

TASK: [nginx | Copy nginx configuration] 
fatal: [127.0.0.1] => {'msg': 'AnsibleUndefinedVariable: One or more undefined variables: the inline if-expression on line 1 evaluated to false and no else section was defined.', 'failed': True}

I'm on Windows and this is my box

Form submitted on adding new port mapping

When I have added new environment and have added port mapping, the form was submitted.

It only happened in Mozilla Firefox, not in Chrome. The behavior was inspected in both hosted online version and hosted version.

Bundler install issue

Hello,
I am trying to follow the steps to install a new railsbox on my macbook, and get stuck at the following error. I am new to RoR and ansible, any hints on how to debug the situation and solve the issue would be greatly appreciated.

TASK: [ruby | bundle install] ************************************************* 
failed: [wherecani] => {"changed": true, "cmd": ["/bin/bash", "-l", "-c", "bundle install"], "delta": "0:00:00.236763", "end": "2015-08-16 16:36:08.413656", "rc": 10, "start": "2015-08-16 16:36:08.176893", "warnings": []}
stdout: Could not locate Gemfile or .bundle/ directory

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/a_lassignardie/site.retry

wherecani                  : ok=36   changed=6    unreachable=0    failed=1

So it looks like it fails while trying to install a bundle...
Thanks !

Error in TASK: [postgresql | Create config/database.yml] ***************************

Hello,
I get errors in my vagrant up step:
These are the errors. Maybe you know how to fix them. Thank you and kind regards:

TASK: [postgresql | Create config/database.yml] *******************************
failed: [myapp] => {"failed": true}
msg: Destination directory /myapp/config does not exist

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/David/site.retry

myapp : ok=13 changed=1 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Having network issues on vagrant up

$ vagrant up                                                     [ruby-2.1.5@rails-41]
checking for ansible-playbook... yes
Bringing machine 'imobi' up with 'virtualbox' provider...
==> imobi: Checking if box 'ubuntu/trusty64' is up to date...
==> imobi: Clearing any previously set network interfaces...
A host only network interface you're attempting to configure via DHCP
already has a conflicting host only adapter with DHCP enabled. The
DHCP on this adapter is incompatible with the DHCP settings. Two
host only network interfaces are not allowed to overlap, and each
host only network interface can have only one DHCP server. Please
reconfigure your host only network or remove the virtual machine
using the other host only network.

Box url: https://railsbox.io/boxes/649ae293cbc6

Selected orm is not saved

After selecting a PostgreSQL db and any orm (f.i. ActiveRecord), I try to edit the box, but the orm is reset back to "Do not configure"

Why use VirtualBox in Docker (Experimental) implementation?

Great effort with this railsbox generator. Impressive.

I am curious why in the experimental docker effort you are also still using virtualbox in the mix?
The use of docker containers should replace the need for a virtual machine, right? I see that in your main vagrantfile as you configure the containers, for each container you call another vagrantfile which sets up a virtual machine itself as it does in your standard implementation. Can you explain this?

vagrant up stuck at "create and migrate db". log says "I cannot read /etc/chef/validation.pem"

My first attempt to use Vagrant (I set it up with Railsbox);
After unzipping the myapp-railsbox.zip file, and cd-ing to the railsbox directory,
"vagrant up" went happily through many steps, but is now stuck here:

TASK: [unicorn | Create upstart config] ***************************************

changed: [myapp]

TASK: [webserver | Create and migrate DB] *************************************

I poked around in /var/log, and found this in /var/log/chef/client.log
[2015-03-10T19:14:21+00:00] WARN: Failed to read the private key /etc/chef/validation.pem: #<Errno::ENOENT: No such file or directory - /etc/chef/validation.pem>

[2015-03-10T19:14:21+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

[2015-03-10T19:14:21+00:00] ERROR: I cannot read /etc/chef/validation.pem, which you told me to use to sign requests!

[2015-03-10T19:14:21+00:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

[2015-03-10T19:14:21+00:00] ERROR: Sleeping for 1800 seconds before trying again

So I guess that's the source of the problem: missing /etc/chef/validation.pem.

Googling around hasn't helped.

Any thoughts or advice?

Nginx / Unicorn error when trying to access the app

I created this box and provisioning went well. However when I'm trying to access the app via http://localhost:8080 I get the following in the nginx error.log:

2015/03/22 22:27:02 [crit] 1134#0: *1 connect() to unix:/tmp/unicorn.development.sock failed (2: No such file or directory) while connecting to upstream, client: 10.0.2.2, server: localhost, request: "GET / HTTP/1.1", upstream: "http://unix:/tmp/unicorn.development.sock:/", host: "localhost:8080"

I read that this might be because it is not possible to store the socket files in /tmp anymore, but I'm not sure if this applies to Ubuntu.

Upgraded packages

How can we install the latest packages as below
Currently installs -> Upgrade to
postgres is 9.3 -> 9.5
nodejs 0.10.25 -> 5.50 && npm 3.5.3
nginx 1.4.6 -> 1.8.0

rvm

When running the production play book, I received an error cannot mkdir /home/deploy/.rvm.
I was able to ssh into my VPS and manually make the directory. I was wondering if you could give me some guidance here. I am new to ansible and I didn't find too much documentation about production deployment for railsbox.

Executing bundler as root instead of the new created user.

Hello guys, I'm having an error when executing the provision.sh script. More specifically, the error is in the deploy task, when trying to install the gems with Bundler.

TASK: [deploy | Install gems] ************************************************* 
failed: [162.243.231.216] => {"changed": true, "cmd": ["/bin/bash", "-lc", "bundle install --deployment --without=\"development test\""], "delta": "0:00:00.008151", "end": "2016-02-16 08:06:40.824821", "rc": 127, "start": "2016-02-16 08:06:40.816670", "warnings": []}
stderr: /bin/bash: bundle: command not found

I checked my server and saw that a new user is created with the name of my app and the rbenv is installed under this user. What I think that is happening is simple: the command above it's being execute as root who doesn't have rbenv installed.

I tried to find a way of executing '/bin/bash -lc' as another user but couldn't find it. Does someone know? Thank you!

may templates be extracted into standalone repository?

Hello Andrey,

thank you for railsbox!
it helped me a lot to get familiar with automated deployment via ansible.
However it didn't work out of box for me ^(. i've got many "permission denied" errors.
I am a Windows guy and also i'm new into Ansible, so it tooks me several days to fix installation without granting full access to everyone on any glitch.

I would like to share the result but it seems inappropriate to me to create pull requests of railsbox itself since ansible roles in templates is the only part i target for now. Not the whole railsbox site with frontend and rails controllers.

May I suggest to extract roles from templates into separate repository and submodule?

PS: my ultimate target is to port your templates to Debian (CentOs) yet still be compatible with Ubuntu. Please share your arguments on this.

Ansible shows 'skipping: no hosts matched'

I proceed with this #10 on my Windows PC. And I re-run the vagrant provision commant. It showed this:

==> rails10-meetup:
==> rails10-meetup: PLAY [vm] **************************************
==> rails10-meetup: skipping: no hosts matched
==> rails10-meetup:
==> rails10-meetup: PLAY [all] *************************************
==> rails10-meetup:
==> rails10-meetup: TASK: [apt_proxy | Setup apt-get proxy] ********
==> rails10-meetup: skipping: [127.0.0.1]
==> rails10-meetup:
==> rails10-meetup: TASK: [apt update_cache=yes] *******************
==> rails10-meetup: ok: [127.0.0.1]
==> rails10-meetup:
==> rails10-meetup: PLAY [mysql] ***********************************
==> rails10-meetup: skipping: no hosts matched
==> rails10-meetup:
==> rails10-meetup: PLAY [application] *****************************
==> rails10-meetup: skipping: no hosts matched
==> rails10-meetup:
==> rails10-meetup: PLAY RECAP *************************************
==> rails10-meetup: 127.0.0.1 : ok=1 changed=0

So I checked /etc/ansible/hosts, like this:

[all]
127.0.0.1

Then I changed it to this:

[all]
127.0.0.1
[vm]
127.0.0.1
[mysql]
127.0.0.1
[application]
127.0.0.1

The ansible can go on.

I checked the shell scripts inside shell directory, shell/2-configure-ansible.sh:

!/bin/bash

set -e
cat > /tmp/hosts << "EOF"
[all]
127.0.0.1
EOF
sudo mv -f /tmp/hosts /etc/ansible/hosts

Is there anyone else having the same problem like me?

RVM permission denied

I'm getting a strange issue with RVM.

stderr: mkdir: cannot create directory ‘/home/vagrant/.rvm’: Permission denied

anyone else getting this? Thanks

Installation of rubies fails

TASK: [ruby | Detect if rubies are installed] ********************************* 
ok: [gtrs] => (item=2.2.1)

TASK: [ruby | Install rubies] ************************************************* 
skipping: [gtrs] => (item={u'cmd': [u'/home/vagrant/.rvm/bin/rvm', u'2.2.1', u'do', u'true'], u'end': u'2015-12-10 18:07:18.333648', u'stderr': u'', u'stdout': u'', 'item': u'2.2.1', u'changed': False, u'rc': 0, 'failed': False, u'warnings': [], u'delta': u'0:00:00.255758', 'invocation': {'module_name': u'command', 'module_args': u'/home/vagrant/.rvm/bin/rvm 2.2.1 do true'}, 'stdout_lines': [], 'failed_when_result': False, u'start': u'2015-12-10 18:07:18.077890'})

TASK: [ruby | Install rubies (non-binary)] ************************************ 
fatal: [gtrs] => Failed to template {% if item.rc != 0 && install_rubies.results[0].rc != 0 %} True {% else %} False {% endif %}: template error while templating string: unexpected char u'&' at 19

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/rodush/site.retry

gtrs                       : ok=33   changed=5    unreachable=1    failed=0   

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

PostgreSQL ansible error

My first attempt trying to install railsbox, i got this error while running ansible:

TASK: [postgresql | Configure PostgreSQL - postgresql.conf] ******************* 
failed: [devbox] => {"failed": true}
msg: Destination directory /etc/postgresql/9.3/main does not exist

FATAL: all hosts have already failed -- aborting

To solve this problem it was necessary log in vagrant ssh and type:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
sudo pg_createcluster 9.3 main --start

and now run provision to check again:

vagrant provision

Probably there is something missing on locale settings.

postgresql_extensions.control -> no such file or directory

myapp: failed: [127.0.0.1] (item=postgresql_extensions) => {"changed": true, "cmd": "psql myapp -c 'CREATE EXTENSION IF NOT EXISTS postgresql_extensions;'", "delta": "0:00:00.053190", "end": "2017-09-08 17:56:30.268541", "failed": true, "item": "postgresql_extensions", "rc": 1, "start": "2017-09-08 17:56:30.215351", "stderr": "ERROR: could not open extension control file "/usr/share/postgresql/9.3/extension/postgresql_extensions.control": No such file or directory", "stderr_lines": ["ERROR: could not open extension control file "/usr/share/postgresql/9.3/extension/postgresql_extensions.control": No such file or directory"], "stdout": "", "stdout_lines": []}

Does anybody know what could be causing this?

TASK [ruby : Install rubies] fails

Here's what I get

[DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
playbook so that the environment value uses the full variable syntax 

('{{detect_rubies.results}}').
This feature will be removed in a future 
release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.
failed: [myapp] (item={'_ansible_item_result': True, u'end': u'2016-08-26 18:56:05.748305', '_ansible_no_log': False, u'stdout': u'', u'changed': False, u'ra': 2, 'item': u'2.2.0', u'cmd': [u'/home/vagrant/.rvm/bin/rvm', u'2.2.0', u'do', u'true'], u'stderr': u'Ruby ruby-2.2.0 is not installed.', u'delta': u'0:00:12.370479', 'invocation': {'module_name': u'command', u'module_args': {u'creates': None, u'executable': None, u'_uses_shell': False, u'_raw_params': u'/home/vagrant/.rvm/bin/rvm 2.2.0 do true', u'removes': None, u'warn': True, u'chdir': None}}, 'stdout_lines': [], 'failed_when_result': False, u'start': u'2016-08-26 18:55:53.377826', u'warnings': [], 'failed': False}) => {"changed": true, "cmd": ["/home/vagrant/.rvm/bin/rvm", "install", "2.2.0", "--binary"], "delta": "0:00:48.893371", "end": "2016-08-26 18:56:56.555375", "failed": true, "item": {"changed": false, "cmd": ["/home/vagrant/.rvm/bin/rvm", "2.2.0", "do", "true"], "delta": "0:00:12.370479", "end": "2016-08-26 18:56:05.748305", "failed": false, "failed_when_result": false, "invocation": {"module_args": {"_raw_params": "/home/vagrant/.rvm/bin/rvm 2.2.0 do true", "_uses_shell": false, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "item": "2.2.0", "rc": 2, "start": "2016-08-26 18:55:53.377826", "stderr": "Ruby ruby-2.2.0 is not installed.", "stdout": "", "stdout_lines": [], "warnings": []}, "rc": 1, "start": "2016-08-26 18:56:07.662004", "stderr": "Requested binary installation but no rubies are available to download, consider skipping --binary flag.", "stdout": "Searching for binary rubies, this might take some time.", "stdout_lines": ["Searching for binary rubies, this might take some time."], "warnings": []}
...ignoring

Then the next one just hangs...

TASK [ruby : Install rubies (non-binary)] **************************************
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your 
playbook so that the environment value uses the full variable syntax 

('{{detect_rubies.results}}').
This feature will be removed in a future 
release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.

rbenv: cannot rehash

Hi,
I'm running into a problem using rbenv:

==> samplit: TASK: [ruby | Add brightbox/ruby-ng repository] *******************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Install ruby] ***************************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Detect rvm binary] **********************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Detect rvm installer] *******************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Detect current rvm version] *************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Install rvm installer] ******************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Configure rvm installer] ****************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Import GPG keys] ************************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Install rvm] ****************************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Update rvm] *****************************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Configure rvm] **************************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Detect if rubies are installed] *********************************
==> samplit: skipping: [127.0.0.1] => (item=2.1.2)
==> samplit:
==> samplit: TASK: [ruby | Install rubies] *************************************************
==> samplit: skipping: [127.0.0.1] => (item={u'skipped': True, u'changed': False})
==> samplit:
==> samplit: TASK: [ruby | Install rubies (non-binary)] ************************************
==> samplit: skipping: [127.0.0.1] => (item={u'skipped': True, u'changed': False})
==> samplit:
==> samplit: TASK: [ruby | Detect default ruby version] ************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Select default ruby] ********************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Symlink ruby related binaries on the system path] ***************
==> samplit: skipping: [127.0.0.1] => (item=bundle)
==> samplit: skipping: [127.0.0.1] => (item=bundler)
==> samplit: skipping: [127.0.0.1] => (item=erb)
==> samplit: skipping: [127.0.0.1] => (item=executable-hooks-uninstaller)
==> samplit: skipping: [127.0.0.1] => (item=gem)
==> samplit: skipping: [127.0.0.1] => (item=irb)
==> samplit: skipping: [127.0.0.1] => (item=rake)
==> samplit: skipping: [127.0.0.1] => (item=rdoc)
==> samplit: skipping: [127.0.0.1] => (item=ri)
==> samplit: skipping: [127.0.0.1] => (item=ruby)
==> samplit: skipping: [127.0.0.1] => (item=testrb)
==> samplit:
==> samplit: TASK: [ruby | Create rvm.sh] **************************************************
==> samplit: skipping: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Install libffi-dev] *********************************************
==> samplit: ok: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Clone rbenv repository to ~/.rbenv] *****************************
==> samplit: ok: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Create rbenv.sh] ************************************************
==> samplit: ok: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Create plugins directory] ***************************************
==> samplit: ok: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Install plugins] ************************************************
==> samplit: ok: [127.0.0.1] => (item={'git': 'https://github.com/sstephenson/ruby-build.git', 'name': 'ruby-build', 'version': 'master'})
==> samplit:
==> samplit: TASK: [ruby | Check if ruby installed] ****************************************
==> samplit: changed: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Install ruby] ***************************************************
==> samplit: skipping: [127.
==> samplit: 0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Set global ruby version] ****************************************
==> samplit: changed: [127.0.0.1]
==> samplit:
==> samplit: TASK: [ruby | Rehash rbenv] ***************************************************
==> samplit: failed: [127.0.0.1] => {"changed": true, "cmd": ["/home/vagrant/.rbenv/bin/rbenv", "rehash"], "delta": "0:00:00.013844", "end": "2015-04-16 00:15:08.194019", "rc": 1, "start": "2015-04-16 00:15:08.180175", "warnings": []}
==> samplit: stderr: rbenv: cannot rehash: /home/vagrant/.rbenv/shims/.rbenv-shim exists
==> samplit:
==> samplit: FATAL: all hosts have already failed -- aborting
==> samplit:
==> samplit: PLAY RECAP ********************************************************************
==> samplit:            to retry, use: --limit @/home/vagrant/site.retry
==> samplit:
==> samplit: 127.0.0.1                  : ok=82   changed=49   unreachable=0    failed=1
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

This is the box if it helps: https://railsbox.io/boxes/7237e5591058

Any idea how to fix this?

nginx returns 502 errors with unicorn

Hello,
when choosing "unicorn" as application server will result in a 502 error when going on page localhost:8080. Found the reason: unicorn was not in the Gemfile and is launch with "bundle exec unicorn".

We may force this gem in Gemfile, or display a message.. don't know what's best.

'ansible_ssh_user' is not set?

I'm getting an error with RVM.

==> rails-dvlasov: TASK [ruby : Install rvm] ****************************************************** ==> rails-dvlasov: fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": ["/tmp/rvm-installer.sh", "stable", "--path", "/home//.rvm", "--auto-dotfiles", "--user-install"], "delta": "0:00:00.021989", "end": "2016-04-12 18:38:47.655138", "failed": true, "rc": 1, "start": "2016-04-12 18:38:47.633149", "stderr": "mkdir: cannot create directory ‘/home//.rvm’: Permission denied", "stdout": "Turning on auto dotfiles mode.\nTurning on user install mode.", "stdout_lines": ["Turning on auto dotfiles mode.", "Turning on user install mode."], "warnings": []} ==> rails-dvlasov: to retry, use: --limit @/ansible/site.retry ==> rails-dvlasov: ==> rails-dvlasov: PLAY RECAP ********************************************************************* ==> rails-dvlasov: 127.0.0.1 : ok=28 changed=4 unreachable=0 failed=1 The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

It looks like a bug with this line:
rvm1_install_path: '/home/{{ ansible_ssh_user }}/.rvm'

redis-server

I had to manually install redis-server after vagrant up.

$ sudo apt-get install redis-server

A rbenv install error occurs on vagrant up

Is there any solution for this?

TASK: [ruby | Clone rbenv repository to ~/.rbenv] *****************************
changed: [wants]

TASK: [ruby | Create rbenv.sh] ************************************************
changed: [wants]

TASK: [ruby | Create plugins directory] ***************************************
changed: [wants]

TASK: [ruby | Install plugins] ************************************************
changed: [wants] => (item={'git': 'https://github.com/sstephenson/ruby-build.git', 'name': 'ruby-build', 'version': 'master'})

TASK: [ruby | Check if ruby installed] ****************************************
failed: [wants] => {"changed": true, "cmd": "/home/vagrant/.rbenv/bin/rbenv versions | grep -q 2.2.0", "delta": "0:00:00.003975", "end": "2015-01-16 02:13:21.833742", "rc": 1, "start": "2015-01-16 02:13:21.829767", "warnings": []}
stderr: /bin/sh: 1: /home/vagrant/.rbenv/bin/rbenv: not found
...ignoring

TASK: [ruby | Install ruby] ***************************************************
failed: [wants] => {"cmd": "/home/vagrant/.rbenv/bin/rbenv install 2.2.0", "failed": true, "rc": 2}
msg: [Errno 2] No such file or directory

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/hyo/site.retry

wants                      : ok=35   changed=25   unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.