kmerz / graveio

where your code stays alive
BSD 2-Clause "Simplified" License
8 stars 11 forks source link

"ERROR: RVM Ruby not used" after Vagrant install #45

Closed dloss closed 10 years ago

dloss commented 10 years ago

I installed graveio with Vagrant, but trying to run 'sudo -E bundle install' I get the following error:

$ vagrant ssh Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)

154 packages can be updated. 70 updates are security updates.

Welcome to your Vagrant-built virtual machine. Last login: Fri Sep 14 06:22:31 2012 from 10.0.2.2 vagrant@graveio-dev:~$ cd /vagrant/ vagrant@graveio-dev:/vagrant$ sudo -E bundle install ERROR: RVM Ruby not used, run rvm use 1.8 first. vagrant@graveio-dev:/vagrant$ rvm use 1.8 ruby-1.8.7-p374 is not installed. To install do: 'rvm install ruby-1.8.7-p374'

h5b commented 10 years ago

Seems to be a failed rvm installation. Please try with fixed rvm version in Vagrantfile as follows:

diff --git a/Vagrantfile b/Vagrantfile
index aaff2a2..2f6b4e1 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -27,6 +27,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

     chef.json = {
       :rvm => {
+        :version => "1.17.10",
         :rubies => ["ruby-1.9.3-head"],
         :default_ruby => "ruby-1.9.3-head",
       }
h5b commented 10 years ago

In case bundle install fails, drop "sudo -E" for now:

$ bundle install
dloss commented 10 years ago

Thank you, those two fixes helped.

Adding the RVM version fixed the first error. Then I had to run "bundle install" as suggested to fix another problem:

vagrant@graveio-dev:/vagrant$ sudo -E bundle install [...] Your bundle is complete! Use bundle show [gemname] to see where a bundled gem is installed. vagrant@graveio-dev:/vagrant$ rake db:create && rake db:migrate https://github.com/tmm1/pygments.rb (at master) is not yet checked out. Run bundle install first. vagrant@graveio-dev:/vagrant$ bundle install [...] vagrant@graveio-dev:/vagrant$ rake db:create && rake db:migrate == CreatePosts: migrating ==================================================== -- create_table(:posts) -> 0.0036s == CreatePosts: migrated (0.0046s) =========================================== [...]

h5b commented 10 years ago

Thanks for reporting this.

kmerz commented 10 years ago

Thanks everybody :+1: