Code Monkey home page Code Monkey logo

rails-dev-box's Introduction

A Virtual Machine for Ruby on Rails Core Development

Introduction

Please note this VM is not designed for Rails application development, only Rails core development.

This project automates the setup of a development environment for working on Ruby on Rails itself. Use this virtual machine to work on a pull request with everything ready to hack and run the test suites.

Requirements

  • VirtualBox

  • Vagrant 2

  • Install the vagrant-vbguest plugin: vagrant plugin install vagrant-vbguest.

How To Build The Virtual Machine

Building the virtual machine is this easy:

host $ git clone https://github.com/rails/rails-dev-box.git
host $ cd rails-dev-box
host $ vagrant up

That's it.

After the installation has finished, you can access the virtual machine with

host $ vagrant ssh
Welcome to Ubuntu 23.10 (GNU/Linux 6.5.0-14-generic x86_64)
...
vagrant@rails-dev-box:~$

Port 3000 in the host computer is forwarded to port 3000 in the virtual machine. Thus, applications running in the virtual machine can be accessed via localhost:3000 in the host computer. Be sure the web server is bound to the IP 0.0.0.0, instead of 127.0.0.1, so it can access all interfaces:

bin/rails server -b 0.0.0.0

RAM and CPUs

By default, the VM launches with 2 GB of RAM and 2 CPUs.

These can be overridden by setting the environment variables RAILS_DEV_BOX_RAM and RAILS_DEV_BOX_CPUS, respectively. Settings on VM creation don't matter, the environment variables are checked each time the VM boots.

RAILS_DEV_BOX_RAM has to be expressed in megabytes, so configure 4096 if you want the VM to have 4 GB of RAM.

What's In The Box

  • Development tools

  • Git

  • Ruby 3.1

  • Bundler

  • SQLite3, MySQL, and Postgres

  • Databases and users needed to run the Active Record test suite

  • System dependencies for nokogiri, sqlite3, mysql2, and pg

  • Memcached

  • Redis

  • RabbitMQ

  • An ExecJS runtime

Recommended Workflow

The recommended workflow is

  • edit in the host computer and

  • test within the virtual machine.

Just clone your Rails fork into the rails-dev-box directory on the host computer:

host $ ls
bootstrap.sh MIT-LICENSE README.md Vagrantfile
host $ git clone [email protected]:<your username>/rails.git

Vagrant mounts that directory as /vagrant within the virtual machine:

vagrant@rails-dev-box:~$ ls /vagrant
bootstrap.sh MIT-LICENSE rails README.md Vagrantfile

Install gem dependencies in there:

vagrant@rails-dev-box:~$ cd /vagrant/rails
vagrant@rails-dev-box:/vagrant/rails$ bundle

We are ready to go to edit in the host, and test in the virtual machine.

Please have a look at the Contributing to Ruby on Rails guide for tips on how to run test suites, how to generate an application that uses your local checkout of Rails, etc.

This workflow is convenient because in the host computer you normally have your editor of choice fine-tuned, Git configured, and SSH keys in place.

Virtual Machine Management

When done just log out with ^D and suspend the virtual machine

host $ vagrant suspend

then, resume to hack again

host $ vagrant resume

Run

host $ vagrant halt

to shutdown the virtual machine, and

host $ vagrant up

to boot it again.

You can find out the state of a virtual machine anytime by invoking

host $ vagrant status

Finally, to completely wipe the virtual machine from the disk destroying all its contents:

host $ vagrant destroy # DANGER: all is gone

Please check the Vagrant documentation for more information on Vagrant.

Faster Rails test suites

The default mechanism for sharing folders is convenient and works out the box in all Vagrant versions, but there are a couple of alternatives that are more performant.

rsync

Vagrant 1.5 implements a sharing mechanism based on rsync that dramatically improves read/write because files are actually stored in the guest. Just throw

config.vm.synced_folder '.', '/vagrant', type: 'rsync'

to the Vagrantfile and either rsync manually with

vagrant rsync

or run

vagrant rsync-auto

for automatic syncs. See the post linked above for details.

NFS

If you're using Mac OS X or Linux you can increase the speed of Rails test suites with Vagrant's NFS synced folders.

With an NFS server installed (already installed on Mac OS X), add the following to the Vagrantfile:

config.vm.synced_folder '.', '/vagrant', type: 'nfs'
config.vm.network 'private_network', ip: '192.168.50.4' # ensure this is available

Then

host $ vagrant up

Please check the Vagrant documentation on NFS synced folders for more information.

Troubleshooting

On vagrant up, it's possible to get this error message:

The box 'ubuntu/yakkety64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
vagrant login. Also, please double-check the name. The expanded
URL and error message are shown below:

URL: ["https://atlas.hashicorp.com/ubuntu/yakkety64"]
Error:

And a known work-around (Varying-Vagrant-Vagrants/VVV#354) can be:

sudo rm /opt/vagrant/embedded/bin/curl

License

Released under the MIT License, Copyright (c) 2012–ω Xavier Noria.

rails-dev-box's People

Contributors

eliotsykes avatar fcarrega avatar franc avatar fudoshiki avatar fxn avatar garyf avatar iamjarvo avatar jasl avatar joshgoebel avatar ken1flan avatar maxarturo avatar meinac avatar mlafeldt avatar pablox-cl avatar paulrex avatar pnc avatar rafaelfranca avatar rywall avatar sahilm avatar seuros avatar simonjefford avatar sobrinho avatar takkanm avatar tamarr avatar tigerwolf avatar tjschuck avatar vijaydev avatar waldofe avatar yahonda avatar yuvipanda 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  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

rails-dev-box's Issues

License

Is there a License on this code? There doesn't seem to be one and it would be good to attach one. MIT might make sense as it's what Rails uses.

rails dev box should not conflict with other packages

If you wan't to include some additional modules like Redis you quickly will be burried with Puppet modules conflicts.
Almost everyone include build-essential and git-core and in this case the lasr ot the puppet module will fail.
So your puppet module should respect all resources that was declared by previous modules.

How to achive this:
I found good example at puppet-rvm module:
https://github.com/blt04/puppet-rvm/blob/master/manifests/dependencies/ubuntu.pp

if ! defined(Package['build-essential'])      { package { 'build-essential':      ensure => installed } }

https://github.com/blt04/puppet-rvm

By doing so your module will be more reliable.

Capistrano problems, but I believe this belongs here

From what I gathered the below might be caused by incorrect .bash_profile or .bashrc
But unfortunately I am not able to track down the cause of this problem.

/home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 1 column 1
4 (Psych::SyntaxError)
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
        from /home/vagrant/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:127:in `load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy/assets.rb:26:in `parse_manifest'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy/assets.rb:93:in `block (3 levels) in load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks
'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/callback.rb:38:in `call'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `each'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:23:in `invoke_task_directly_with_callbacks
'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/callback.rb:38:in `call'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `each'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks
'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:234:in `block (3 levels) in load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:56:in `transaction'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:233:in `block (2 levels) in load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks
'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/recipes/deploy.rb:201:in `block (2 levels) in load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks
'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:45:in `each'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:34:in `execute!'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/lib/capistrano/cli/execute.rb:14:in `execute'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.15.5/bin/cap:4:in `<top (required)>'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/bin/cap:19:in `load'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/bin/cap:19:in `<main>'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
        from /home/vagrant/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

Can i use this box for rails applications development?

The readme file says "Please note this virtual machine is not designed to be used for Rails application development.". Can or should i use this box for rails applications development? if not, what changes should i apply to make it suitable for development?

RVM won't install using the defaults

Error: sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install ruby-2.1.1 --binary --autolibs=enabled && rvm alias create default 2.1.1' returned 1 instead of one of [0]
Error: /Stage[main]/Main/Exec[install_ruby]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install ruby-2.1.1 --binary --autolibs=enabled && rvm alias create default 2.1.1' returned 1 instead of one of [0]
Warning: /Stage[main]/Main/Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies

In my /home/vagrant/.rvm/config/remote file is the following line:

https://rvm.io/binaries/debian/7/x86_64/ruby-2.1.1.tar.bz2

I'm running ubuntu 14.04 within Vagrant.

Any idea why this might be happening?

User and Password

Hello!, where can I find the user and password?, because the rails-dev-box required an user and password

Use rbenv for ruby version management

@fxn What do you think about using rbenv for ruby version management? Since you might want to test rails against an older version of ruby then that is installed on the dev-box.

At this moment you have to build that version from source and manage the versions manually. I know there has been a discussion about this back in 2013, at that time rvm was decided as a ruby version manager. Since we are 2 years further in the future, I want to bring this up again.

If you're interested in this change I'll be willing to create this.

Readme needs additional explanation for port-forwarding

I loaded up the rails box with Vagrant and upon creating a test app was stumped because I couldn't forward the port. Running curl on guest with 'http://localhost:3000' yielded results, but not on the host side. Following all the vagrant docs still didn't lead me anywhere, until I ran into this SO post that suggested to bind WEBrick to 0.0.0.0, instead of 127.0.0.1 so that all interfaces can access it.

I would be surprised if not more would-be collaborators would run into issues there, so its likely worthwhile to include in the docs. I'd love to hear if anyone else has run into that.

Thanks!

Vagrant box can't provision

Hy guys, I've cloned the repo to my local machine and run vagrant up, but some packages couldn't get installed. I've tried to fix it by myself but without success (sorry, I'd open a PR if I could). Anyway, here's the log for the failed packages:

==> default: notice: /Stage[main]//Exec[install_rvm]/returns: executed successfully
==> default: err: /Stage[main]//Exec[install_ruby]/returns: change from notrun to 0 failed: bash: /home/vagrant/.rvm/bin/rvm: No such file or directory
==> default:
==> default: notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_ruby] has failures: true
==> default: warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies

(...)

==> default: err: /Stage[main]/Install_postgres/Apt::Source[postgresql]/Apt::Key[Add key: ACCC4CF8 from Apt::Source postgresql]/Apt_key[Add key: ACCC4CF8 from Apt::Source postgresql]/ensure: change from absent to present failed: Could not set 'present on ensure: Network is unreachable - connect(2) at /tmp/vagrant-puppet-3/modules-0/apt/manifests/key.pp:93
==> default: notice: /Stage[main]/Install_postgres/Apt::Source[postgresql]/Apt::Key[Add key: ACCC4CF8 from Apt::Source postgresql]/Anchor[apt_key ACCC4CF8 present]: Dependency Apt_key[Add key: ACCC4CF8 from Apt::Source postgresql] has failures: true
==> default: warning: /Stage[main]/Install_postgres/Apt::Source[postgresql]/Apt::Key[Add key: ACCC4CF8 from Apt::Source postgresql]/Anchor[apt_key ACCC4CF8 present]: Skipping because of failed dependencies

==> default: err: /Stage[main]/Postgresql/Package[postgresql-client-9.3]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql-client-9.3' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E: Unable to locate package postgresql-client-9.3
==> default: E: Couldn't find any package by regex 'postgresql-client-9.3'
==> default:
  • RVM doesn't get installed (I guess there's something to do with that --binary option)
  • Postgres 9.3 doesn't get installed (can't find the 9.3 version, even after the apt-get update, I guess there's something to do with that new apt-get source, but I'm not sure)
  • RabbitMQ doesn't get installed too (this one I don't know why)

The full log is here: https://gist.github.com/matiasleidemer/d2d372ee4bb6eda3faf9

ArgumentError: invalid byte sequence in US-ASCII in jquery-rails

I installed the box, cloned rails and did bundle install, which always results in the following, no matter if I do it in the host or in the guest system

$ bundle
Updating git://github.com/rails/arel.git
Updating git://github.com/brynary/rack-test.git
Updating git://github.com/rails/jquery-rails.git
Updating git://github.com/rails/coffee-rails.git
Updating git://github.com/rails/journey.git
Updating git://github.com/rails/activerecord-deprecated_finders.git
Updating git://github.com/rails/sprockets-rails.git
Updating git://github.com/fxn/sdoc.git
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Using rake (0.9.2.2) 
Using i18n (0.6.1) 
Using minitest (4.2.0) 
Using multi_json (1.3.7) 
Using tzinfo (0.3.34) 
Using activesupport (4.0.0.beta) from source at /Users/darth/projects/rails-dev-box/vagrant/rails 
Using builder (3.1.4) 
Using erubis (2.7.0) 
Using journey (2.0.0.20120723141804) from git://github.com/rails/journey.git (at master) 
Using rack (1.4.1) 
Using rack-test (0.6.2) from git://github.com/brynary/rack-test.git (at master) 
Using actionpack (4.0.0.beta) from source at /Users/darth/projects/rails-dev-box/vagrant/rails 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.4.4) 
Using actionmailer (4.0.0.beta) from source at /Users/darth/projects/rails-dev-box/vagrant/rails 
Using activemodel (4.0.0.beta) from source at /Users/darth/projects/rails-dev-box/vagrant/rails 
Using activerecord-deprecated_finders (0.0.1) from git://github.com/rails/activerecord-deprecated_finders.git (at master) 
Using arel (3.0.2.20120819075748) from git://github.com/rails/arel.git (at master) 
Using activerecord (4.0.0.beta) from source at /Users/darth/projects/rails-dev-box/vagrant/rails 
Using bcrypt-ruby (3.0.1) 
Using benchmark-ips (1.2.0) 
Using bundler (1.2.1) 
Using coffee-script-source (1.4.0) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using json (1.7.5) 
Using rdoc (3.12) 
Using thor (0.16.0) 
Using railties (4.0.0.beta) from source at /Users/darth/projects/rails-dev-box/vagrant/rails 
Using coffee-rails (4.0.0.beta) from git://github.com/rails/coffee-rails.git (at master) 
Using columnize (0.3.6) 
Using dalli (2.3.0) 
Using debugger-ruby_core_source (1.1.4) 
Using debugger-linecache (1.1.2) 
Using debugger (1.2.1) 
Using hike (1.2.1) 
Using jquery-rails (2.1.4) from git://github.com/rails/jquery-rails.git (at master) 
ArgumentError: invalid byte sequence in US-ASCII
An error occurred while installing jquery-rails (2.1.4), and Bundler cannot continue.
Make sure that `gem install jquery-rails -v '2.1.4'` succeeds before bundling.

Vagrant assumes that this means the command failed!

➜  rails-dev-box git:(master) ls
MIT-LICENSE README.md   Vagrantfile puppet
➜  rails-dev-box git:(master) vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise32' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...te: 434k/s, Estimated time remaining: --:--:--)
Successfully added box 'precise32' with provider 'virtualbox'!
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 3000 => 3000. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 2200 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
GuestAdditions versions on your host (4.2.18) and guest (4.2.0) do not match.
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  fakeroot linux-headers-3.2.0-23 make patch
Suggested packages:
  make-doc diffutils-doc
Recommended packages:
  linux-headers-generic-pae linux-headers-686-pae linux-headers-amd64
  linux-headers-generic linux-headers
The following NEW packages will be installed:
  dkms fakeroot linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic-pae make
  patch
0 upgraded, 6 newly installed, 0 to remove and 66 not upgraded.
Need to get 12.7 MB of archives.
After this operation, 68.5 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main make i386 3.81-8.1ubuntu1 [116 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main patch i386 2.6.1-3 [86.0 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main dkms all 2.2.0.3-1ubuntu3 [73.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main fakeroot i386 1.18.2-1 [87.9 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23 all 3.2.0-23.36 [11.4 MB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23-generic-pae i386 3.2.0-23.36 [944 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 12.7 MB in 1min 48s (117 kB/s)
Selecting previously unselected package make.
(Reading database ... 29361 files and directories currently installed.)
Unpacking make (from .../make_3.81-8.1ubuntu1_i386.deb) ...
Selecting previously unselected package patch.
Unpacking patch (from .../patch_2.6.1-3_i386.deb) ...
Selecting previously unselected package dkms.
Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3_all.deb) ...
Selecting previously unselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.18.2-1_i386.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23.
Unpacking linux-headers-3.2.0-23 (from .../linux-headers-3.2.0-23_3.2.0-23.36_all.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23-generic-pae.
Unpacking linux-headers-3.2.0-23-generic-pae (from .../linux-headers-3.2.0-23-generic-pae_3.2.0-23.36_i386.deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8.1ubuntu1) ...
Setting up patch (2.6.1-3) ...
Setting up dkms (2.2.0.3-1ubuntu3) ...
Setting up fakeroot (1.18.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.
Setting up linux-headers-3.2.0-23 (3.2.0-23.36) ...
Setting up linux-headers-3.2.0-23-generic-pae (3.2.0-23.36) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-23-generic-pae /boot/vmlinuz-3.2.0-23-generic-pae
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
stdin: is not a tty
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 4.2.18 - guest version is 4.2.0
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.18 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.2.0 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers ...fail!
(Could not find the X.Org or XFree86 Window System.)
An error occurred during installation of VirtualBox Guest Additions 4.2.18. Some functionality may not work as intended.
stdin: is not a tty
[default] Setting hostname...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn
notice: /Stage[preinstall]/Apt_get_update/Exec[apt-get -y update]/returns: executed successfully
notice: /Stage[main]//Package[build-essential]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libxslt1-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libsqlite3-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Memcached/Package[memcached]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[sqlite3]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Package[libpq-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[nodejs]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[curl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Exec[install_rvm]/returns: executed successfully
err: /Stage[main]//Exec[install_ruby]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install ruby-2.1.1 --binary --autolibs=enabled && rvm alias create default 2.1.1' returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:145
notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_ruby] has failures: true
warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies
notice: /Stage[main]//Package[git-core]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql/Package[mysql_client]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Database_user[rails@localhost]/ensure: created
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/inexistent_activerecord_unittest]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]/content: content changed '{md5}7694a77a71d01d43944f0ec2aa3fb165' to '{md5}17645e6222916aa1e4554e9ad1607038'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]/content: content changed '{md5}5b9755510f68c05f186faa477cf3fb58' to '{md5}b8d0fb15b77aca35b26d9deeb9e55619'
notice: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Triggered 'refresh' from 3 events
notice: /Stage[main]/Install_postgres/Package[postgresql-contrib]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[rails]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[vagrant]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Memcached/File[/etc/memcached.conf]/content: content changed '{md5}58c9e04b29e08c2e9b3094794d3ebd0e' to '{md5}16c49164edef89725fd3853440dd3ebc'
notice: /Stage[main]/Memcached/Service[memcached]: Triggered 'refresh' from 1 events
notice: /Stage[main]//Exec[update-locale]/returns: executed successfully
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: content changed '{md5}77f15d6c87f9c136c4efcda072017f71' to '{md5}31067e9939d7d1c7e5bb7a02cf11f0f4'
notice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/ensure: defined content as '{md5}1a632000ff7bfcbfb2921f81930d0698'
notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Triggered 'refresh' from 2 events
notice: Finished catalog run in 1607.17 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' --detailed-exitcodes /tmp/vagrant-puppet/manifests/default.pp || [ $? -eq 2 ]

rails dev box should not conflict with other packages

If you wan't to include some additional modules like Redis you quickly will be burried with Puppet modules conflicts.
Almost everyone include build-essential and git-core packages and in this case the puppet module included last will fail.
So your puppet module should respect all resources that was declared by previous and next modules.

How to achive this:
I found a good example at puppet-rvm module:
https://github.com/blt04/puppet-rvm/blob/master/manifests/dependencies/ubuntu.pp

if ! defined(Package['build-essential'])      { package { 'build-essential':      ensure => installed } }

Now your module will not fail if someone already declared package 'build-essential'. This syntax is more verbose, but more reliable.

https://github.com/blt04/puppet-rvm

By doing so your module will be more reliable.

pg database?

As I get PG::ConnectionBad when I try to view my rails app, I realized that I need to create database and user before I start my app

when I do:
sudo createuser
I get:
[sudo] password for postgres:

So, what's the password for user postgres in the virtual machine?

Or, is there a previously created user, database I can start immediately? what are they? what are the passwords?

How to fix `mri_22` is not a valid platform.

I haven't been using rails-dev-box for a while. When I've recently logged in with vagrant ssh and tried to bundle I got the following error:

vagrant@rails-dev-box:/vagrant/rails$ bundle
`mri_22` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20,
:ruby_21, :mri, :mri_18, :mri_19, :mri_20, :mri_21, :rbx, :jruby, :jruby_18, :jruby_19, :mswin, :mingw,
:mingw_18, :mingw_19, :mingw_20, :mingw_21, :x64_mingw, :x64_mingw_20, :x64_mingw_21]

This is caused by the recent upgrade of Rails to Ruby 2.2 (and then to Ruby 2.2.1).

I fixed this error by running sudo gem update bundler inside the virtual machine.

Chef recipes?

Hi Xavier,

Is there any special reason why not to use Chef instead of Puppet?

I don't want to get into the discussion on which one is better, but as this box is intended for Rais development and since I would assume more people would be interested in contributing if it used Chef, I want to know if there have been any relevant reasons into taking such decision.

Thanks!

PG::ConnectionBad

When I do rake db:migrate, I get error, I am setting my database as:

development:
adapter: postgresql
encoding: unicode
database: postgres
host: localhost
pool: 5
username: vagrant
password:

the error is:

rake aborted!
PG::ConnectionBad: fe_sendauth: no password supplied
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in initialize' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:innew'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in connect' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:568:ininitialize'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in new' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:inpostgresql_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in new_connection' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:incheckout_new_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in acquire_connection' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:inblock in checkout'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in checkout' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:inblock in connection'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in connection' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:inretrieve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:113:in retrieve_connection' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:87:inconnection'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/migration.rb:909:in initialize' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/migration.rb:807:innew'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/migration.rb:807:in up' /var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/migration.rb:785:inmigrate'
/var/lib/gems/2.1.0/gems/activerecord-4.1.6/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Issue with 'gsubs'

After calling vagrant up I'm getting the following error:

   C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/kernel_v2/config/v
m.rb:131:in `synced_folder': undefined method `gsub!' for #<Pathname:0x23fc370>
(NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/provi
sioners/puppet/provisioner/puppet.rb:31:in `configure'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/a
ction/builtin/provision.rb:41:in `block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/a
ction/builtin/provision.rb:40:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/a
ction/builtin/provision.rb:40:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/a
ction/warden.rb:34:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/plugins/provi
ders/virtualbox/action/clear_forwarded_ports.rb:13:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.2.6/lib/vagrant/a
ction/warden.rb:34:in `call'

Use Vagrant 1.5+

Vagrant 1.5+ includes several improvements over the previous versions as listed here: https://www.vagrantup.com/blog/vagrant-1-5-and-vagrant-cloud.html

Does it make sense to bump the Vagrantfile syntax to the new one?

Also, does it make sense to use a qualified name for the box (i.e. hashicorp/precise32) so there is some standardization introduced? I found out for e.g. that I had a box named precise32 locally with some modifications that I had made a year back!

The new Vagrant box should be functionally equivalent to the older one.

I am happy to send a PR for this including an updated README. Thoughts?

Add phppgadmin for postgres web administration

Hey, I really enjoy this box, real time saver :)

The only (small) issue I have is that I have to manually install phppgadmin in each vm.

Is it something you can add to the puppet please (I have no idea how to do it)?

Thank you

Vagrant up not working

Hi,

I was trying to set up this environment for playing around with it, and following the instructions, at the second step, after the cloning the repository, what I get is this:

jjgarcia@tipin:rails-dev-box$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise32' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...te: 1433k/s, Estimated time remaining: 0:00:01)
Successfully added box 'precise32' with provider 'virtualbox'!
[default] Importing base box 'precise32'...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["import", "/Users/jjgarcia/.vagrant.d/boxes/precise32/virtualbox/box.ovf"]

Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/jjgarcia/.vagrant.d/boxes/precise32/virtualbox/box.ovf...
OK.
0%...
Progress object failure: NS_ERROR_CALL_FAILED

If I try running VBoxManage manually I get almost the same information, but maybe someone is able to get any insight from it:

jjgarcia@tipin:rails-dev-box$VBoxManage import /Users/jjgarcia/.vagrant.d/boxes/precise32/virtualbox/box.ovf
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Users/jjgarcia/.vagrant.d/boxes/precise32/virtualbox/box.ovf...
OK.
Disks:  vmdisk1 85899345920 -1  http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized   box-disk1.vmdk  -1  -1  
Virtual system 0:
 0: Suggested OS type: "Ubuntu"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: Suggested VM name "precise32"
    (change with "--vsys 0 --vmname <name>")
 2: Number of CPUs: 1
    (change with "--vsys 0 --cpus <n>")
 3: Guest memory: 384 MB
    (change with "--vsys 0 --memory <MB>")
 4: Network adapter: orig NAT, config 3, extra slot=0;type=NAT
 5: CD-ROM
    (disable with "--vsys 0 --unit 5 --ignore")
 6: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 6 --ignore")
 7: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 7 --ignore")
 8: SATA controller, type AHCI
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Hard disk image: source image=box-disk1.vmdk, target path=/Users/jjgarcia/VirtualBox VMs/precise32/box-disk1.vmdk, controller=8;channel=0
    (change target path with "--vsys 0 --unit 9 --disk path";
    disable with "--vsys 0 --unit 9 --ignore")
0%...
Progress object failure: NS_ERROR_CALL_FAILED

My system is a MacOS 10.8.4, vagrant version is 1.2.2, and VBox version is 4.2.14r86644.

Any idea of what can be happening?

Thank you.

Problem with running the box on MacOS X 10.7

With Vagrant file:

 denis:rails-dev-box/ (master) $ vagrant --version                                                                                  [12:12:02]
/Volumes/MacHD/Users/denis/code/rails-dev-box/Vagrantfile:1:in `<top (required)>': undefined method `configure' for Vagrant:Module (NoMethodError)
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `load'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `block in procs_for_source'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config.rb:41:in `block in capture_configures'
    from <internal:prelude>:10:in `synchronize'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config.rb:36:in `capture_configures'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:114:in `procs_for_source'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:51:in `block in set'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:45:in `each'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:45:in `set'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/environment.rb:377:in `block in load_config!'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/environment.rb:392:in `call'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/environment.rb:392:in `load_config!'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/lib/vagrant/environment.rb:327:in `load!'
    from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/vagrant-1.0.7/bin/vagrant:40:in `<top (required)>'
    from /usr/local/bin/vagrant:23:in `load'
    from /usr/local/bin/vagrant:23:in `<main>'
 denis:rails-dev-box/ (master) $ cd ..                                                                                              [12:12:06]
 denis:code/ $ vagrant --version                                                                                                    [12:12:13]
Vagrant version 1.0.7

With VirtualBox:

 denis:rails-dev-box/ (master✗) $ vagrant up                        [12:01:17]
[default] Importing base box 'precise32'...
There was an error executing the following command with VBoxManage:

["import", "/Volumes/MacHD/Users/denis/.vagrant.d/boxes/precise32/box.ovf"]

For more information on the failure, enable detailed logging with
VAGRANT_LOG.
 denis:rails-dev-box/ (master✗) $ VBoxManage import /Volumes/MacHD/Users/denis/.vagrant.d/boxes/precise32/box.ovf
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /Volumes/MacHD/Users/denis/.vagrant.d/boxes/precise32/box.ovf...
OK.
Disks:  vmdisk1 85899345920 -1  http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized   box-disk1.vmdk  -1  -1
Virtual system 0:
 0: Suggested OS type: "Ubuntu"
    (change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
 1: Suggested VM name "precise32"
    (change with "--vsys 0 --vmname <name>")
 2: Number of CPUs: 1
    (change with "--vsys 0 --cpus <n>")
 3: Guest memory: 384 MB
    (change with "--vsys 0 --memory <MB>")
 4: Network adapter: orig NAT, config 3, extra slot=0;type=NAT
 5: CD-ROM
    (disable with "--vsys 0 --unit 5 --ignore")
 6: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 6 --ignore")
 7: IDE controller, type PIIX4
    (disable with "--vsys 0 --unit 7 --ignore")
 8: SATA controller, type AHCI
    (disable with "--vsys 0 --unit 8 --ignore")
 9: Hard disk image: source image=box-disk1.vmdk, target path=/Users/denis/VirtualBox VMs/precise32/box-disk1.vmdk, controller=8;channel=0
    (change target path with "--vsys 0 --unit 9 --disk path";
    disable with "--vsys 0 --unit 9 --ignore")
0%...
Progress state: VBOX_E_IPRT_ERROR
VBoxManage: error: Appliance import failed
VBoxManage: error: Could not create the directory '/Users/denis/VirtualBox VMs/precise32' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 781 of file VBoxManageAppliance.cpp

Problems in start first time in debian/crunchbang

I have a this report of warnings and errors when execute:

vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.1
[default] Setting hostname...
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn
notice: /Stage[preinstall]/Apt_get_update/Exec[apt-get -y update]/returns: executed successfully
notice: /Stage[main]//Package[build-essential]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libxslt1-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libsqlite3-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Memcached/Package[memcached]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[sqlite3]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Package[libpq-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[nodejs]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[curl]/ensure: ensure changed 'purged' to 'present'
err: /Stage[main]//Exec[install_rvm]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c 'curl -L https://get.rvm.io | bash -s stable' returned 18 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:130
notice: /Stage[main]//Exec[install_ruby]: Dependency Exec[install_rvm] has failures: true
warning: /Stage[main]//Exec[install_ruby]: Skipping because of failed dependencies
notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_rvm] has failures: true
warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies
notice: /Stage[main]//Package[git-core]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql/Package[mysql_client]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Database_user[rails@localhost]/ensure: created
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]/content: content changed '{md5}7694a77a71d01d43944f0ec2aa3fb165' to '{md5}17645e6222916aa1e4554e9ad1607038'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]/content: content changed '{md5}5b9755510f68c05f186faa477cf3fb58' to '{md5}b8d0fb15b77aca35b26d9deeb9e55619'
notice: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Triggered 'refresh' from 3 events
notice: /Stage[main]/Install_postgres/Package[postgresql-contrib]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[rails]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[vagrant]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Memcached/File[/etc/memcached.conf]/content: content changed '{md5}58c9e04b29e08c2e9b3094794d3ebd0e' to '{md5}16c49164edef89725fd3853440dd3ebc'
notice: /Stage[main]/Memcached/Service[memcached]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: content changed '{md5}77f15d6c87f9c136c4efcda072017f71' to '{md5}31067e9939d7d1c7e5bb7a02cf11f0f4'
notice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/ensure: defined content as '{md5}1a632000ff7bfcbfb2921f81930d0698'
notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Triggered 'refresh' from 2 events
notice: Finished catalog run in 253.34 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]

cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]

Add The Foreman

Would it be possible to add The Foreman to the list of pre-installed packages? I would be happy to do a pull request if you give me permissions.

Error on vagrant up

When starting vagrant after following the docs the following errors are outputted:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Setting hostname...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
err: /Stage[main]//Exec[install_ruby]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install 2.0.0 --latest-binary     --autolibs=enabled && rvm --fuzzy alias create default 2.0.0' returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:141
notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_ruby] has failures: true
warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies
notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure     changed 'purged' to 'present'
notice: Finished catalog run in 16.69 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' --detailed-exitcodes /tmp/vagrant-puppet/manifests/default.pp || [ $? -eq 2 ]

Stdout from the command:

err: /Stage[main]//Exec[install_ruby]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install 2.0.0 --latest-binary --autolibs=enabled && rvm --fuzzy alias create default 2.0.0' returned 1 instead of     one of [0] at /tmp/vagrant-puppet/manifests/default.pp:141
notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_ruby] has failures: true
warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies
notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure changed 'purged' to 'present'
notice: Finished catalog run in 16.69 seconds


Stderr from the command:

stdin: is not a tty

I'm not sure if it's related but when trying to bundle on the VM, I get ERROR: RVM Ruby not used, run rvm use 1.8 first. I imagine this should all be setup?

bootstrap.sh installs Ruby 2.2.0, but Ruby 2.2.1 is required.

Running rails-dev-box, and following instructions from the contributors guide, I hit this error when trying to use Rails:

vagrant@rails-dev-box:/vagrant/rails$ bundle exec rails new

    Rails 5 requires to run on Ruby 2.2.1 or newer.

    You're running
      ruby 2.2.0p0 (2014-12-25 revision 49005) [i386-linux-gnu]

    Please upgrade to Ruby 2.2.1 or newer to continue.

It seems 2.2.1 isn't yet available from apt-get, so should bootstrap.sh be updated to install ruby from source? I'd be happy to put a PR together.

Provisioning question

This is more of a question than an issue:

Just curious why this project uses a shell provisioner instead of puppet or chef? While a shell provisioner is very straightforward for initial installs, it tends to be clunky for configuration maintenance, development and upgrades. If I discover some free time, which I am currently lacking, would a pull request porting this shell provisioner to puppet be welcome?

Thanks.

Operation not permitted - connect(2) (Errno::EPERM) on master branch

In 4.2.0.beta1, trying to run the tests gives an error:

vagrant@rails-dev-box:/vagrant/rails/actionpack$ rake test
/home/vagrant/.rvm/rubies/ruby-2.1.1/bin/ruby -w -I"lib:test" -I"/home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib" "/home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib/rake/rake_test_load
er.rb" "test/abstract/callbacks_test.rb" "test/abstract/collector_test.rb" "test/abstract/translation_test.rb" "test/assertions/response_assertions_test.rb" "test/controller/action_pack_assertions_test.rb" "test/
controller/base_test.rb" "test/controller/caching_test.rb" "test/controller/content_type_test.rb" "test/controller/default_url_options_with_before_action_test.rb" "test/controller/filters_test.rb" "test/controlle
r/flash_hash_test.rb" "test/controller/flash_test.rb" "test/controller/force_ssl_test.rb" "test/controller/helper_test.rb" "test/controller/http_basic_authentication_test.rb" "test/controller/http_digest_authenti
cation_test.rb" "test/controller/http_token_authentication_test.rb" "test/controller/integration_test.rb" "test/controller/live_stream_test.rb" "test/controller/localized_templates_test.rb" "test/controller/log_s
ubscriber_test.rb" "test/controller/mime/accept_format_test.rb" "test/controller/mime/respond_to_test.rb" "test/controller/mime/responders_test.rb" "test/controller/new_base/bare_metal_test.rb" "test/controller/n
ew_base/base_test.rb" "test/controller/new_base/content_negotiation_test.rb" "test/controller/new_base/content_type_test.rb" "test/controller/new_base/metal_test.rb" "test/controller/new_base/middleware_test.rb"
"test/controller/new_base/render_action_test.rb" "test/controller/new_base/render_body_test.rb" "test/controller/new_base/render_context_test.rb" "test/controller/new_base/render_file_test.rb" "test/controller/ne
w_base/render_html_test.rb" "test/controller/new_base/render_implicit_action_test.rb" "test/controller/new_base/render_layout_test.rb" "test/controller/new_base/render_partial_test.rb" "test/controller/new_base/r
ender_plain_test.rb" "test/controller/new_base/render_streaming_test.rb" "test/controller/new_base/render_template_test.rb" "test/controller/new_base/render_test.rb" "test/controller/new_base/render_text_test.rb"
 "test/controller/new_base/render_xml_test.rb" "test/controller/output_escaping_test.rb" "test/controller/parameters/accessors_test.rb" "test/controller/parameters/always_permitted_parameters_test.rb" "test/contr
oller/parameters/log_on_unpermitted_params_test.rb" "test/controller/parameters/multi_parameter_attributes_test.rb" "test/controller/parameters/mutators_test.rb" "test/controller/parameters/nested_parameters_test
.rb" "test/controller/parameters/parameters_permit_test.rb" "test/controller/parameters/raise_on_unpermitted_params_test.rb" "test/controller/params_wrapper_test.rb" "test/controller/permitted_params_test.rb" "te
st/controller/redirect_test.rb" "test/controller/render_js_test.rb" "test/controller/render_json_test.rb" "test/controller/render_other_test.rb" "test/controller/render_test.rb" "test/controller/render_xml_test.r
b" "test/controller/request/test_request_test.rb" "test/controller/request_forgery_protection_test.rb" "test/controller/required_params_test.rb" "test/controller/rescue_test.rb" "test/controller/resources_test.rb
" "test/controller/routing_test.rb" "test/controller/runner_test.rb" "test/controller/send_file_test.rb" "test/controller/show_exceptions_test.rb" "test/controller/streaming_test.rb" "test/controller/test_case_te
st.rb" "test/controller/url_for_integration_test.rb" "test/controller/url_for_test.rb" "test/controller/url_rewriter_test.rb" "test/controller/webservice_test.rb" "test/dispatch/callbacks_test.rb" "test/dispatch/
cookies_test.rb" "test/dispatch/debug_exceptions_test.rb" "test/dispatch/header_test.rb" "test/dispatch/live_response_test.rb" "test/dispatch/mapper_test.rb" "test/dispatch/middleware_stack/middleware_test.rb" "t
est/dispatch/middleware_stack_test.rb" "test/dispatch/mime_type_test.rb" "test/dispatch/mount_test.rb" "test/dispatch/prefix_generation_test.rb" "test/dispatch/rack_cache_test.rb" "test/dispatch/reloader_test.rb"
 "test/dispatch/request/json_params_parsing_test.rb" "test/dispatch/request/multipart_params_parsing_test.rb" "test/dispatch/request/query_string_parsing_test.rb" "test/dispatch/request/session_test.rb" "test/dis
patch/request/url_encoded_params_parsing_test.rb" "test/dispatch/request_id_test.rb" "test/dispatch/request_test.rb" "test/dispatch/response_test.rb" "test/dispatch/routing/concerns_test.rb" "test/dispatch/routin
g/inspector_test.rb" "test/dispatch/routing/route_set_test.rb" "test/dispatch/routing_assertions_test.rb" "test/dispatch/routing_test.rb" "test/dispatch/session/abstract_store_test.rb" "test/dispatch/session/cach
e_store_test.rb" "test/dispatch/session/cookie_store_test.rb" "test/dispatch/session/mem_cache_store_test.rb" "test/dispatch/session/test_session_test.rb" "test/dispatch/show_exceptions_test.rb" "test/dispatch/ss
l_test.rb" "test/dispatch/static_test.rb" "test/dispatch/template_assertions_test.rb" "test/dispatch/test_request_test.rb" "test/dispatch/test_response_test.rb" "test/dispatch/uploaded_file_test.rb" "test/dispatc
h/url_generation_test.rb" "test/journey/gtg/builder_test.rb" "test/journey/gtg/transition_table_test.rb" "test/journey/nfa/simulator_test.rb" "test/journey/nfa/transition_table_test.rb" "test/journey/nodes/symbol
_test.rb" "test/journey/path/pattern_test.rb" "test/journey/route/definition/parser_test.rb" "test/journey/route/definition/scanner_test.rb" "test/journey/route_test.rb" "test/journey/router/utils_test.rb" "test/journey/router_test.rb" "test/journey/routes_test.rb" "test/routing/helper_test.rb"
/home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/unix.rb:41:in `initialize': Operation not permitted - connect(2) for "///vagrant/rails/actionpack/test/tmp/tests20140822-11521-10g7myz-fd" (Errno::EPERM)
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/unix.rb:41:in `open'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/unix.rb:41:in `open_server'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/drb.rb:764:in `block in open_server'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/drb.rb:762:in `each'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/drb.rb:762:in `open_server'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/drb.rb:1373:in `initialize'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/drb.rb:1664:in `new'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/drb/drb.rb:1664:in `start_service'
        from /vagrant/rails/actionpack/test/abstract_unit.rb:472:in `initialize'
        from /vagrant/rails/actionpack/test/abstract_unit.rb:515:in `new'
        from /vagrant/rails/actionpack/test/abstract_unit.rb:515:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /vagrant/rails/actionpack/test/abstract/callbacks_test.rb:1:in `<top (required)>'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:15:in `block in <main>'
        from /home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:in `select'
        from /home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib:test" -I"/home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib" "/home/vagrant/.rvm/gems/ruby-2.1.1@global/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "
test/abstract/callbacks_test.rb" "test/abstract/collector_test.rb" "test/abstract/translation_test.rb" "test/assertions/response_assertions_test.rb" "test/controller/action_pack_assertions_test.rb" "test/controll
er/base_test.rb" "test/controller/caching_test.rb" "test/controller/content_type_test.rb" "test/controller/default_url_options_with_before_action_test.rb" "test/controller/filters_test.rb" "test/controller/flash_
hash_test.rb" "test/controller/flash_test.rb" "test/controller/force_ssl_test.rb" "test/controller/helper_test.rb" "test/controller/http_basic_authentication_test.rb" "test/controller/http_digest_authentication_t
est.rb" "test/controller/http_token_authentication_test.rb" "test/controller/integration_test.rb" "test/controller/live_stream_test.rb" "test/controller/localized_templates_test.rb" "test/controller/log_subscribe
r_test.rb" "test/controller/mime/accept_format_test.rb" "test/controller/mime/respond_to_test.rb" "test/controller/mime/responders_test.rb" "test/controller/new_base/bare_metal_test.rb" "test/controller/new_base/
base_test.rb" "test/controller/new_base/content_negotiation_test.rb" "test/controller/new_base/content_type_test.rb" "test/controller/new_base/metal_test.rb" "test/controller/new_base/middleware_test.rb" "test/co
ntroller/new_base/render_action_test.rb" "test/controller/new_base/render_body_test.rb" "test/controller/new_base/render_context_test.rb" "test/controller/new_base/render_file_test.rb" "test/controller/new_base/r
ender_html_test.rb" "test/controller/new_base/render_implicit_action_test.rb" "test/controller/new_base/render_layout_test.rb" "test/controller/new_base/render_partial_test.rb" "test/controller/new_base/render_pl
ain_test.rb" "test/controller/new_base/render_streaming_test.rb" "test/controller/new_base/render_template_test.rb" "test/controller/new_base/render_test.rb" "test/controller/new_base/render_text_test.rb" "test/c
ontroller/new_base/render_xml_test.rb" "test/controller/output_escaping_test.rb" "test/controller/parameters/accessors_test.rb" "test/controller/parameters/always_permitted_parameters_test.rb" "test/controller/pa
rameters/log_on_unpermitted_params_test.rb" "test/controller/parameters/multi_parameter_attributes_test.rb" "test/controller/parameters/mutators_test.rb" "test/controller/parameters/nested_parameters_test.rb" "te
st/controller/parameters/parameters_permit_test.rb" "test/controller/parameters/raise_on_unpermitted_params_test.rb" "test/controller/params_wrapper_test.rb" "test/controller/permitted_params_test.rb" "test/contr
oller/redirect_test.rb" "test/controller/render_js_test.rb" "test/controller/render_json_test.rb" "test/controller/render_other_test.rb" "test/controller/render_test.rb" "test/controller/render_xml_test.rb" "test
/controller/request/test_request_test.rb" "test/controller/request_forgery_protection_test.rb" "test/controller/required_params_test.rb" "test/controller/rescue_test.rb" "test/controller/resources_test.rb" "test/
controller/routing_test.rb" "test/controller/runner_test.rb" "test/controller/send_file_test.rb" "test/controller/show_exceptions_test.rb" "test/controller/streaming_test.rb" "test/controller/test_case_test.rb" "
test/controller/url_for_integration_test.rb" "test/controller/url_for_test.rb" "test/controller/url_rewriter_test.rb" "test/controller/webservice_test.rb" "test/dispatch/callbacks_test.rb" "test/dispatch/cookies_
test.rb" "test/dispatch/debug_exceptions_test.rb" "test/dispatch/header_test.rb" "test/dispatch/live_response_test.rb" "test/dispatch/mapper_test.rb" "test/dispatch/middleware_stack/middleware_test.rb" "test/disp
atch/middleware_stack_test.rb" "test/dispatch/mime_type_test.rb" "test/dispatch/mount_test.rb" "test/dispatch/prefix_generation_test.rb" "test/dispatch/rack_cache_test.rb" "test/dispatch/reloader_test.rb" "test/d
ispatch/request/json_params_parsing_test.rb" "test/dispatch/request/multipart_params_parsing_test.rb" "test/dispatch/request/query_string_parsing_test.rb" "test/dispatch/request/session_test.rb" "test/dispatch/re
quest/url_encoded_params_parsing_test.rb" "test/dispatch/request_id_test.rb" "test/dispatch/request_test.rb" "test/dispatch/response_test.rb" "test/dispatch/routing/concerns_test.rb" "test/dispatch/routing/inspec
tor_test.rb" "test/dispatch/routing/route_set_test.rb" "test/dispatch/routing_assertions_test.rb" "test/dispatch/routing_test.rb" "test/dispatch/session/abstract_store_test.rb" "test/dispatch/session/cache_store_
test.rb" "test/dispatch/session/cookie_store_test.rb" "test/dispatch/session/mem_cache_store_test.rb" "test/dispatch/session/test_session_test.rb" "test/dispatch/show_exceptions_test.rb" "test/dispatch/ssl_test.r
b" "test/dispatch/static_test.rb" "test/dispatch/template_assertions_test.rb" "test/dispatch/test_request_test.rb" "test/dispatch/test_response_test.rb" "test/dispatch/uploaded_file_test.rb" "test/dispatch/url_ge
neration_test.rb" "test/journey/gtg/builder_test.rb" "test/journey/gtg/transition_table_test.rb" "test/journey/nfa/simulator_test.rb" "test/journey/nfa/transition_table_test.rb" "test/journey/nodes/symbol_test.rb
" "test/journey/path/pattern_test.rb" "test/journey/route/definition/parser_test.rb" "test/journey/route/definition/scanner_test.rb" "test/journey/route_test.rb" "test/journey/router/utils_test.rb" "test/journey/
router_test.rb" "test/journey/routes_test.rb" "test/routing/helper_test.rb" ]
/home/vagrant/.rvm/gems/ruby-2.1.1@global/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-2.1.1@global/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)

ls: cannot access /vagrant: No such file or directory

I have followed all instructions, but when I do

vagrant@vagrant-ubuntu-trusty-32:~$ ls /vagrant
I get:
ls: cannot access /vagrant: No such file or directory

Although:
vagrant@vagrant-ubuntu-trusty-32:$ cd ..
vagrant@vagrant-ubuntu-trusty-32:/home$ dir
ubuntu vagrant
vagrant@vagrant-ubuntu-trusty-32:/home$ cd vagrant
vagrant@vagrant-ubuntu-trusty-32:
$ ls
vagrant@vagrant-ubuntu-trusty-32:~$

it seems vagrant is empty at my VM, although I did clone my repo into rails-dev-box at host

Any idea?

bootstrapping installs Ruby 2.2.1, but 2.2.2 is required

Just a ticket to let people know this is a know issue. As soon as those packages exist they will get installed.

Since 2.2.2 is a security release I guess these packages are going to be out soon, but as a temporary workaround please use a version manager or compile Ruby.

RVM getting skipped with exit code 52

Running on Mac OS 10.7.5 with Vagrant 1.2.2 and VirtualBox 4.2.12, I am getting an error when installing RVM. Everything else is fine, but it apparently it returns code 52 when attempting to install RVM, which means all the Ruby stuff does not install.

notice: /Stage[main]//Package[libxslt1-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libsqlite3-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Memcached/Package[memcached]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[sqlite3]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Package[libpq-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[nodejs]/ensure: ensure changed 'purged' to 'present'
^C[default] Waiting for cleanup before exiting...
notice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[curl]/ensure: ensure changed 'purged' to 'present'
err: /Stage[main]//Exec[install_rvm]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c 'curl -L https://get.rvm.io | bash -s stable' returned 52 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:125
notice: /Stage[main]//Exec[install_ruby]: Dependency Exec[install_rvm] has failures: true
warning: /Stage[main]//Exec[install_ruby]: Skipping because of failed dependencies
notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_rvm] has failures: true
warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies
notice: /Stage[main]//Package[git-core]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql::Server/Service[mysqld]/enable: enable changed 'false' to 'true'
notice: /Stage[main]/Mysql/Package[mysql_client]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Database_user[rails@localhost]/ensure: created
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]/content: content changed '{md5}7694a77a71d01d43944f0ec2aa3fb165' to '{md5}17645e6222916aa1e4554e9ad1607038'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]/content: content changed '{md5}5b9755510f68c05f186faa477cf3fb58' to '{md5}b8d0fb15b77aca35b26d9deeb9e55619'
notice: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Triggered 'refresh' from 3 events
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[rails]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[vagrant]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Memcached/File[/etc/memcached.conf]/content: content changed '{md5}58c9e04b29e08c2e9b3094794d3ebd0e' to '{md5}16c49164edef89725fd3853440dd3ebc'
notice: /Stage[main]/Memcached/Service[memcached]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: content changed '{md5}77f15d6c87f9c136c4efcda072017f71' to '{md5}31067e9939d7d1c7e5bb7a02cf11f0f4'
notice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/ensure: defined content as '{md5}1a632000ff7bfcbfb2921f81930d0698'
notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Triggered 'refresh' from 2 events
notice: Finished catalog run in 766.08 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]

Thoughts?

Problem with running Rails-dev-box on Windows 64-bit machine

Hey guys and gals,

So I recently was trying to set up rails-dev-box on my Windows 8 computer but I got an error message from the command line instead.

So in order to install the rails-dev-box I followed the instructions given in the README. The problem occurs when I get to the instruction "vagrant up" doing this tells me the that it is "Waiting for the VM to Boot. This could take a few minutes".

Unfortunately, right after this I receive the following error message "The VM failed to remain in the "running" state while attempting to boot." It then recommends that I open virtualbox to possibly get a more detailed error message, and the command line program exits.

Opening Virtual box after this message results in the following error,
"Callee RC: CO_E_SERVER_EXEC_FAIURE(0x80080005)"

With virtualbox then refusing to open.

However, I know that my virtual box installation is just fine because I had it previously installed with an Ubuntu image and it runs without any issues. After rebooting my computer I am then able to open virtual box and boot into my Ubuntu image just fine, but every time I try to run rails-dev-box it errors out on me.

I thought perhaps I was setting something up incorrectly so I pulled out my Windows 7 machine and followed the exact same instructions and installed the same versions of everything and I was able to get everything up and running with no issues.

I also searched some forums to see if anyone else has had this issue, to no success. So I thought it best to let you know of this potential problem with your rails-dev-box.

This problem may be with vagrant communicating with virtual box and this may in fact be out of your control I just thought I should warn you of this potential bug when trying to install it on Windows 8 machines.

The specs of my machine that is having the problem are:
Windows 8 64-bit
Core i7 920
6GB RAM
500 GB SSD

The versions of everything that I am running is as follow,

Rails Environment Configuration.


git:
version: git version 1.8.1.msysgit.1
ruby:
bin: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
version: ruby 1.9.3p392 (2013-02-22) [i386-mingw32]

rails:
bin: C:/RailsInstaller/Ruby1.9.3/bin/rails.bat
version: Rails 3.2.13

The error message that is given is shown in the screenshot below,
2

The following then happens,
4 5

If anyone knows a fix or workaround please let me know. Or if you know others are also experiencing this problem and want me to investigate it further I would be happy to do so.
Thanks.

set utf8 locale?

Hello,

I ran into a bit of a utf8-latin1 snag running bundle exec rake guides:generate*.

I realize this is not the primary purpose of the dev box, but it took me a good while to figure out what exactly the issue was and then how exactly to fix it. (At first I looked at the code, environmental settings, etc. /etc/default/locale was a bit of a last ditch effort.)

Anyway, can we update the locale in the puppet manifest? Seems like update-locale LANG=en_US.UTF-8 would solve the issue and probably wouldn't cause any issues given the current default is en_US anyway.

Thanks!

* in a bit of irony, the guides discussion of utf8 encoding, like here http://guides.rubyonrails.org/getting_started.html#configuration-gotchas, with sample character funk broke the build :)

Vagrant assumes that this means the command failed!

➜ rails-dev-box git:(master) ls
MIT-LICENSE README.md Vagrantfile puppet
➜ rails-dev-box git:(master) vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise32' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
Extracting box...te: 434k/s, Estimated time remaining: --:--:--)
Successfully added box 'precise32' with provider 'virtualbox'!
[default] Importing base box 'precise32'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 3000 => 3000. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 2200 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
GuestAdditions versions on your host (4.2.18) and guest (4.2.0) do not match.
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
fakeroot linux-headers-3.2.0-23 make patch
Suggested packages:
make-doc diffutils-doc
Recommended packages:
linux-headers-generic-pae linux-headers-686-pae linux-headers-amd64
linux-headers-generic linux-headers
The following NEW packages will be installed:
dkms fakeroot linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic-pae make
patch
0 upgraded, 6 newly installed, 0 to remove and 66 not upgraded.
Need to get 12.7 MB of archives.
After this operation, 68.5 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main make i386 3.81-8.1ubuntu1 [116 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main patch i386 2.6.1-3 [86.0 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main dkms all 2.2.0.3-1ubuntu3 [73.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main fakeroot i386 1.18.2-1 [87.9 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23 all 3.2.0-23.36 [11.4 MB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23-generic-pae i386 3.2.0-23.36 [944 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 12.7 MB in 1min 48s (117 kB/s)
Selecting previously unselected package make.
(Reading database ... 29361 files and directories currently installed.)
Unpacking make (from .../make_3.81-8.1ubuntu1_i386.deb) ...
Selecting previously unselected package patch.
Unpacking patch (from .../patch_2.6.1-3_i386.deb) ...
Selecting previously unselected package dkms.
Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3_all.deb) ...
Selecting previously unselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.18.2-1_i386.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23.
Unpacking linux-headers-3.2.0-23 (from .../linux-headers-3.2.0-23_3.2.0-23.36_all.deb) ...
Selecting previously unselected package linux-headers-3.2.0-23-generic-pae.
Unpacking linux-headers-3.2.0-23-generic-pae (from .../linux-headers-3.2.0-23-generic-pae_3.2.0-23.36_i386.deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8.1ubuntu1) ...
Setting up patch (2.6.1-3) ...
Setting up dkms (2.2.0.3-1ubuntu3) ...
Setting up fakeroot (1.18.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.
Setting up linux-headers-3.2.0-23 (3.2.0-23.36) ...
Setting up linux-headers-3.2.0-23-generic-pae (3.2.0-23.36) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-23-generic-pae /boot/vmlinuz-3.2.0-23-generic-pae
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
stdin: is not a tty
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 4.2.18 - guest version is 4.2.0
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.18 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.2.0 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

Installing the Window System drivers ...fail!
(Could not find the X.Org or XFree86 Window System.)
An error occurred during installation of VirtualBox Guest Additions 4.2.18. Some functionality may not work as intended.
stdin: is not a tty
[default] Setting hostname...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn
notice: /Stage[preinstall]/Apt_get_update/Exec[apt-get -y update]/returns: executed successfully
notice: /Stage[main]//Package[build-essential]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libxslt1-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[libsqlite3-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Memcached/Package[memcached]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[sqlite3]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Package[libpq-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[nodejs]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Package[curl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]//Exec[install_rvm]/returns: executed successfully
err: /Stage[main]//Exec[install_ruby]/returns: change from notrun to 0 failed: sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install ruby-2.1.1 --binary --autolibs=enabled && rvm alias create default 2.1.1' returned 1 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:145
notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[install_ruby] has failures: true
warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies
notice: /Stage[main]//Package[git-core]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Mysql/Package[mysql_client]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_mysql/Database_user[rails@localhost]/ensure: created
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/inexistent_activerecord_unittest]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Install_mysql/Database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]/content: content changed '{md5}7694a77a71d01d43944f0ec2aa3fb165' to '{md5}17645e6222916aa1e4554e9ad1607038'
notice: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]/content: content changed '{md5}5b9755510f68c05f186faa477cf3fb58' to '{md5}b8d0fb15b77aca35b26d9deeb9e55619'
notice: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Triggered 'refresh' from 3 events
notice: /Stage[main]/Install_postgres/Package[postgresql-contrib]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[rails]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]/ensure: created
notice: /Stage[main]/Install_postgres/Pg_user[vagrant]/ensure: created
notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]/privileges: privileges changed '' to 'all'
notice: /Stage[main]/Memcached/File[/etc/memcached.conf]/content: content changed '{md5}58c9e04b29e08c2e9b3094794d3ebd0e' to '{md5}16c49164edef89725fd3853440dd3ebc'
notice: /Stage[main]/Memcached/Service[memcached]: Triggered 'refresh' from 1 events
notice: /Stage[main]//Exec[update-locale]/returns: executed successfully
notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: content changed '{md5}77f15d6c87f9c136c4efcda072017f71' to '{md5}31067e9939d7d1c7e5bb7a02cf11f0f4'
notice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/ensure: defined content as '{md5}1a632000ff7bfcbfb2921f81930d0698'
notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Triggered 'refresh' from 2 events
notice: Finished catalog run in 1607.17 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' --detailed-exitcodes /tmp/vagrant-puppet/manifests/default.pp || [ $? -eq 2 ]

postinstall.sh?

There's no mention of running postinstall.sh after vagrant ssh, but when I load up this box for the first time and SSH in, it's there in my home directory. Are we supposed to run it? It spits out lots of errors about missing permissions.

no workee

I dont know why, first this:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'precise32' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
the box yourself. Otherwise Vagrant will attempt to download the
full box prior to discovering this error.
Downloading or copying the box...
←[0KExtracting box...ate: 129k/s, Estimated time remaining: --:--:--)
Successfully added box 'precise32' with provider 'virtualbox'!
[default] Importing base box 'precise32'...
←[0K[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Setting hostname...
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
←[0;33mwarning: Could not retrieve fact fqdn←[0m
←[0;36mnotice: /Stage[preinstall]/Apt_get_update/Exec[apt-get -y update]/returns: executed successfu
lly←[0m
←[0;36mnotice: /Stage[main]//Package[build-essential]/ensure: ensure changed 'purged' to 'present'←[
0m
←[0;36mnotice: /Stage[main]//Package[libxslt1-dev]/ensure: ensure changed 'purged' to 'present'←[0m
←[0;36mnotice: /Stage[main]//Package[libsqlite3-dev]/ensure: ensure changed 'purged' to 'present'←[0
m
←[0;36mnotice: /Stage[main]/Memcached/Package[memcached]/ensure: ensure changed 'purged' to 'present
'←[0m
←[0;36mnotice: /Stage[main]//Package[sqlite3]/ensure: ensure changed 'purged' to 'present'←[0m
←[0;36mnotice: /Stage[main]/Install_postgres/Package[libpq-dev]/ensure: ensure changed 'purged' to '
present'←[0m
←[0;36mnotice: /Stage[main]//Package[nodejs]/ensure: ensure changed 'purged' to 'present'←[0m
←[0;36mnotice: /Stage[main]/Mysql::Server/Package[mysql-server]/ensure: ensure changed 'purged' to '
present'←[0m
←[0;36mnotice: /Stage[main]//Package[curl]/ensure: ensure changed 'purged' to 'present'←[0m
←[0;36mnotice: /Stage[main]//Exec[install_rvm]/returns: executed successfully←[0m
←[1;35merr: /Stage[main]//Exec[install_ruby]/returns: change from notrun to 0 failed: Command exceed
ed timeout at /tmp/vagrant-puppet/manifests/default.pp:141←[0m
←[0;36mnotice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-
ri']: Dependency Exec[install_ruby] has failures: true←[0m
←[0;33mwarning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no
-ri']: Skipping because of failed dependencies←[0m
←[0;36mnotice: /Stage[main]//Package[git-core]/ensure: ensure changed 'purged' to 'present'←[0m
←[0;36mnotice: /Stage[main]/Mysql/Package[mysql_client]/ensure: ensure changed 'purged' to 'present'
←[0m
←[0;36mnotice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]/ensure: ensure changed 'purg
ed' to 'present'←[0m
←[0;36mnotice: /Stage[main]/Install_mysql/Database_user[rails@localhost]/ensure: created←[0m
←[0;36mnotice: /Stage[main]/Install_mysql/Database[activerecord_unittest2]/ensure: created←[0m
←[0;36mnotice: /Stage[main]/Install_mysql/Database[activerecord_unittest]/ensure: created←[0m
←[0;36mnotice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]/priv
ileges: privileges changed '' to 'all'←[0m
←[0;36mnotice: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]/ensure: ensure changed
'purged' to 'present'←[0m
←[0;36mnotice: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]/content: conte
nt changed '{md5}7694a77a71d01d43944f0ec2aa3fb165' to '{md5}ca92c862ff94cf960083ee1ff7859a04'←[0m
←[0;36mnotice: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]/content: content c
hanged '{md5}5b9755510f68c05f186faa477cf3fb58' to '{md5}534693b98291d58690558649988573e3'←[0m
←[0;36mnotice: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Triggered 'refresh' f
rom 3 events←[0m
←[0;36mnotice: /Stage[main]/Install_postgres/Package[postgresql-contrib]/ensure: ensure changed 'pur
ged' to 'present'←[0m
←[0;36mnotice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]/ensure: created←[0m

←[0;36mnotice: /Stage[main]/Install_postgres/Pg_user[rails]/ensure: created←[0m
←[0;36mnotice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]/ensure: created←[0m
←[0;36mnotice: /Stage[main]/Install_postgres/Pg_user[vagrant]/ensure: created←[0m
←[0;36mnotice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]/pri
vileges: privileges changed '' to 'all'←[0m
←[0;36mnotice: /Stage[main]/Memcached/File[/etc/memcached.conf]/content: content changed '{md5}58c9e
04b29e08c2e9b3094794d3ebd0e' to '{md5}63f1835471265615c44de54258946922'←[0m
←[0;36mnotice: /Stage[main]/Memcached/Service[memcached]: Triggered 'refresh' from 1 events←[0m
←[0;36mnotice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]/content: content changed '{md5}77f
15d6c87f9c136c4efcda072017f71' to '{md5}79599dd4d032e99ae1df15acf6658438'←[0m
←[0;36mnotice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]/ensure: defined content as '{md5}17541
252809355734c0e432529a35b5c'←[0m
←[0;36mnotice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Triggered 'refresh' from 2 events←[0
m
←[0;36mnotice: Finished catalog run in 1168.71 seconds←[0m
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-pupp
et/modules-0' default.pp --detailed-exitcodes || [ $? -eq 2 ]

Now it wouldn't start properly.
vagrant ssh doesnt work.
yay1

Advocate Package Install over RubyGems for Vagrant

Hello!

Very cool to see you using Vagrant for this :) I just wanted to let you know that the gem-based install is deprecated. The 1.0.x series of Vagrant is the FINAL version of Vagrant to be distributed via RubyGems. Every future version will be distributed using system packages, available from http://downloads.vagrantup.com/

Please update the README to recommend these.

Thanks!

Are some tests supposed to fail?

Hey,

Given that this repo is supposed to produce a complete environment in which Rails tests can run smoothly, does it make sense that some of them fail for me? Even if all of them run inside Vagrant where everything is supposed to be in place?

Vagrant up don't complete

Hi,

The install process don't complete. I get a lot of warnings.

I am in Mac OS X 10.8.3 with virtual box 4.2.10. I tried using both Zsh and plain Bash. Let me know of any other info that you need.

This is the output:

bash-4.2$ vagrant up
[default] Box precise32 was not found. Fetching box from specified URL...
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: http://files.vagrantup.com/precise32.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
[default] Importing base box 'precise32'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.2.10
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3000 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Setting host name...
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- manifests: /tmp/vagrant-puppet/manifests
[default] -- v-pp-m0: /tmp/vagrant-puppet/modules-0
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/default.pp...
stdin: is not a tty
err: /Stage[preinstall]/Apt_get_update/Exec[apt-get -y update]/returns: change from notrun to 0 failed: Command exceeded timeout at /tmp/vagrant-puppet/manifests/default.pp:18

notice: /Stage[main]//Package[build-essential]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[build-essential]: Skipping because of failed dependencies

notice: /Stage[main]//Package[libxslt1-dev]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[libxslt1-dev]: Skipping because of failed dependencies

notice: /Stage[main]//Package[libxml2]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[libxml2]: Skipping because of failed dependencies

notice: /Stage[main]//Package[libsqlite3-dev]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[libsqlite3-dev]: Skipping because of failed dependencies

notice: /Stage[main]/Memcached/Package[memcached]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Memcached/Package[memcached]: Skipping because of failed dependencies

notice: /Stage[main]//Package[sqlite3]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[sqlite3]: Skipping because of failed dependencies

notice: /Stage[main]/Install_postgres/Package[libpq-dev]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_postgres/Package[libpq-dev]: Skipping because of failed dependencies

notice: /Stage[main]//Package[nodejs]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[nodejs]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Server/Package[mysql-server]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Server/Package[mysql-server]: Skipping because of failed dependencies

notice: /Stage[main]//Package[curl]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[curl]: Skipping because of failed dependencies

notice: /Stage[main]//Exec[install_rvm]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Exec[install_rvm]: Skipping because of failed dependencies

notice: /Stage[main]//Exec[install_ruby]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Exec[install_ruby]: Skipping because of failed dependencies

notice: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Exec[sudo -u vagrant -H bash -l -c 'gem install bundler --no-rdoc --no-ri']: Skipping because of failed dependencies

notice: /Stage[main]//Package[git-core]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[git-core]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Server/Service[mysqld]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Server/Service[mysqld]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql/Package[mysql_client]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql/Package[mysql_client]: Skipping because of failed dependencies

notice: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_mysql/Package[libmysqlclient15-dev]: Skipping because of failed dependencies

notice: /Stage[main]/Install_mysql/Database_user[rails@localhost]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_mysql/Database_user[rails@localhost]: Skipping because of failed dependencies

notice: /Stage[main]/Install_mysql/Database[activerecord_unittest2]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_mysql/Database[activerecord_unittest2]: Skipping because of failed dependencies

notice: /Stage[main]/Install_mysql/Database[activerecord_unittest]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_mysql/Database[activerecord_unittest]: Skipping because of failed dependencies

err: Could not prefetch database_grant provider 'mysql': Command mysql is missing

notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest]: Skipping because of failed dependencies

notice: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Postgresql::Server/Package[postgresql-server-9.1]: Skipping because of failed dependencies

notice: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Postgresql::Server/File[postgresql-server-hba-config-9.1]: Skipping because of failed dependencies

notice: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Postgresql::Server/File[postgresql-server-config-9.1]: Skipping because of failed dependencies

notice: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Postgresql::Server/Service[postgresql-system-9.1]: Skipping because of failed dependencies

notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest2]: Skipping because of failed dependencies

notice: /Stage[main]/Install_postgres/Pg_user[rails]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_postgres/Pg_user[rails]: Skipping because of failed dependencies

notice: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_postgres/Pg_database[activerecord_unittest]: Skipping because of failed dependencies

notice: /Stage[main]/Install_postgres/Pg_user[vagrant]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_postgres/Pg_user[vagrant]: Skipping because of failed dependencies

notice: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Install_mysql/Database_grant[rails@localhost/activerecord_unittest2]: Skipping because of failed dependencies

notice: /Stage[main]//Package[libxml2-dev]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]//Package[libxml2-dev]: Skipping because of failed dependencies

notice: /Stage[main]/Memcached/File[/etc/memcached.conf]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Memcached/File[/etc/memcached.conf]: Skipping because of failed dependencies

notice: /Stage[main]/Memcached/Service[memcached]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Memcached/Service[memcached]: Skipping because of failed dependencies

notice: /Stage[main]/Postgresql/Package[postgresql-client-9.1]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Postgresql/Package[postgresql-client-9.1]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Config/File[/etc/mysql]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Config/File[/etc/mysql]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Config/File[/etc/mysql/my.cnf]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Config/File[/etc/mysql/conf.d]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Config/File[/etc/mysql/conf.d]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Config/Exec[set_mysql_rootpw]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Config/File[/root/.my.cnf]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Config/File[/root/.my.cnf]: Skipping because of failed dependencies

notice: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Dependency Exec[apt-get -y update] has failures: true

warning: /Stage[main]/Mysql::Config/Exec[mysqld-restart]: Skipping because of failed dependencies

notice: Finished catalog run in 298.66 seconds

Install ruby 2.2.1

Since Railties needs to have ruby 2.2.1, I think it would be good to have that installed when running vagrant up

Ruby 1.9.3 not provisioned properly

Summary:

It's entirely possible I'm missing some key step here, but when I do a clean provision of the box it doesn't seem to setup Ruby properly.

Steps to Reproduce:

  • Checkout clean version of a26694c
  • Run vagrant up
  • After provisioning completes, ssh into the box via vagrant ssh or PuTTY
  • Run ruby -v

Expected Results:

  • ruby -v should be v1.9.3-p374

Actual Results:

  • ruby -v is v1.8.7-p358

(Possible) Work Around:

  • Running rvm reinstall 1.9.3 && rvm alias create default 1.9.3 after the install seems to resolve the issue.

No bundle in fresh install

Just installed this with a vagrant up and it does not have bundler.

I get the following error:

The program 'bundle' is currently not installed. To run 'bundle' please ask your administrator to install the package 'bundler'

If I try to install it, here's what happens:

$ gem install bundler
ERROR:  Could not find a valid gem 'bundler' (>= 0) in any repository
ERROR:  Possible alternatives: bundler

rvm install --binary fails

For some reason, this

sudo -u vagrant -H bash -l -c '/home/vagrant/.rvm/bin/rvm install 2.0 --fuzzy --binary --autolibs=enabled && rvm --fuzzy alias create default 2.0'

fails:

/home/vagrant/.rvm/scripts/selector_parse: line 18: __list_remote_ruby_for: command not found
/home/vagrant/.rvm/scripts/selector_parse: line 18: __list_remote_ruby_for: command not found
Searching for binary rubies, this might take some time.
Requested binary installation but no rubies are available to download, consider skipping --binary flag.

~/.rvm/config/remote contains these lines:

...
https://rvm.io/binaries/ubuntu/12.04/i386/ruby-2.0.0-p0.tar.bz2
https://rvm.io/binaries/ubuntu/12.04/i386/ruby-2.0.0-p195.tar.bz2
https://rvm.io/binaries/ubuntu/12.04/i386/ruby-2.0.0-p247.tar.bz2
https://rvm.io/binaries/ubuntu/12.04/i386/ruby-2.0.0-p353.tar.bz2
...

but it doesn't seem to find them 😦

Any ideas?

Ruby 2.0.0 failed to install because of --latest-binary

I was executing according to the README.md and everything went fine until I ssh'd to the machine via [vagrant ssh] and found out there's no ruby 2.0.0. on it. I checked the log and found this: http://bit.ly/1bFibSy

Ruby failed to install because it could not find binaries. I removed the option [--latest-binary], re-ran the highlighted command and it installed successfully.

I am on MacBook Pro OS 10.9.1.

I wish I did not have to dig in the logs during the installation :)

Provisioning of Ruby via RVM fails due to missing dependencies

I ran into an issue whereby the code:

exec { 'install_ruby':
  # We run the rvm executable directly because the shell function assumes an
  # interactive environment, in particular to display messages or ask questions.
  # The rvm executable is more suitable for automated installs.
  #
  # Thanks to @mpapis for this tip.
  command => "${as_vagrant} '${home}/.rvm/bin/rvm install 1.9.3 --latest-binary && rvm --fuzzy alias create default 1.9.3'",
  creates => "${home}/.rvm/bin/ruby",
  require => [ Package['libyaml-dev'], Exec['install_rvm'] ]
}

Is failing to execute, with the following error:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --modulepath '/tmp/vagrant-puppet/modules-0' /tmp/vagrant-puppet/manifests/default.pp --detailed-exitcodes || [$? -eq 2 ]

Actually running the failing command (in the provisioning of ruby) on the loaded box:

rvm install 1.9.3 --latest-binary && rvm --fuzzy alias create default 1.9.3

gives:

Searching for binary rubies, this might take some time.
Installing requirements for ubuntu, might require sudo password
Running 'apt-get --quiet --yes update' would require sudo. 
Cowardly refusing to continue, please read 'rvm autolibs'.
Updating repositories                                                                                        
Missing required packages: autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev.
Cowardly refusing to continue, please read 'rvm autolibs'.

As far as I can tell, these required packages aren't being installed automatically. I'm not sure how they were being installed previously. I did a bit of research and tried adding the --autolibs=3 parameter to the command:

rvm install 1.9.3 --autolibs=3 --latest-binary && rvm --fuzzy alias create default 1.9.3

so that dependencies ARE automatically installed. The autolibs parameter takes 4 possible values (as detailed here):

0, disable, disabled  =>  Disable autolibs.
1, read, read-only  =>  Do not fail if missing packages.
2, fail, read-fail  =>  Fail if missing packages.
3, packages, install-packages  =>  Install missing packages.
4, enable, enabled  =>  Install packages and homebrew if missing.

Setting it to 3 seems to work, and the provisioning succeeds.

what's wrong?

default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Forwarding ports...
[default] -- 22 => 2200 (adapter 1)
[default] -- 3000 => 1235 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Setting host name...
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- manifests: /tmp/vagrant-puppet/manifests
[default] -- v-pp-m0: /tmp/vagrant-puppet/modules-0
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/default.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn

err: /Stage[preinstall]/Apt_get_update/Exec[apt-get -y update]/returns: change from notrun to 0 failed: apt-get -y update returned 100 instead of one of [0] at /tmp/vagrant-puppet/manifests/default.pp:18

.....

err: Could not prefetch database_grant provider 'mysql': Command mysql is missing

Mounting shared folders doesn't work?

Although I followed all the steps, when I try:

vagrant@rails-dev-box:~$ ls \vagrant

I get:

ls: cannot access vagrant: No such file or directory

Here is my full log:

D:\GitHub\mywebsite-website\rails-dev-box\mywebsite-website>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 3000 => 3000 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Mounting shared folders...
default: /vagrant => D:/GitHub/mywebsite-website/rails-dev-box
==> default: Machine already provisioned. Run vagrant provision or use the -- provision
==> default: to force provisioning. Provisioners marked to run always will still
run.

D:\GitHub\mywebsite-website\rails-dev-box\mywebsite-website>vagrant ssh
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-39-generic i686)

Last login: Wed Dec 3 04:24:16 2014 from 10.0.2.2
vagrant@rails-dev-box:$ ls \vagrant
ls: cannot access vagrant: No such file or directory
vagrant@rails-dev-box:
$

`rake test` takes long time

First of all, thanks for creating great tool!

I have one question.
When I run $ bundle exec rake test, it takes so long time.

vagrant@rails-dev-box:/vagrant/rails$ time bundle exec rake test
...
real    198m0.139s
user    46m26.634s
sys     52m15.368s

For some reason, It takes almost 3 hours. I'm using Mac (Processor 2.53 GHz Intel Core 2 Duo, Memory 8 GB 1067 MHz DDR3, Software Mac OS X Lion 10.7.5 (11G63)).

I'm wondering that am I missing something? or is this expected behavior?

(When rails developers fixes or add some code, doesn't they run rake test? they run test only what they think related?)

Thanks.

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.