Comments (11)
Whats your ruby -v
?
from rails-dev-box.
➜ rails-dev-box git:(master) ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
from rails-dev-box.
Can you do a vagrant ssh
and then run an apt-get update
and tell me what the output gives you?
Could you also run test -e /home/vagrant/.rvm
after that aswell?
from rails-dev-box.
➜ rails-dev-box git:(master) vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)
* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:22:31 2012 from 10.0.2.2
vagrant@rails-dev-box:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
vagrant@rails-dev-box:~$ test -e /home/vagrant/.rvm
vagrant@rails-dev-box:~$
from rails-dev-box.
I could just create a fresh dev box:
fxn@yeager:~/tmp $ git clone [email protected]:rails/rails-dev-box.git
Cloning into 'rails-dev-box'...
remote: Counting objects: 219, done.
remote: Compressing objects: 100% (146/146), done.
remote: Total 219 (delta 60), reused 201 (delta 45)
Receiving objects: 100% (219/219), 74.15 KiB, done.
Resolving deltas: 100% (60/60), done.
fxn@yeager:~/tmp $ cd rails-dev-box/
fxn@yeager:~/tmp/rails-dev-box (master)$ vagrant up
[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.6
[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
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: Finished catalog run in 311.28 seconds
from rails-dev-box.
The error suggests that the command apt-get -y update
on line 18 of the manifest failed as it timed out. Could this be due to internet issues?
from rails-dev-box.
My connection seems right and I tried this 3 times.
I checked the version of vagrant and I was running an outdated one. Now it fails in a other point:
➜ rails-dev-box git:(master) vagrant --version
Vagrant version 1.0.5
[I downloaded the new vagrant...]
➜ rails-dev-box git:(master) ✗ vagrant --version
Vagrant version 1.1.5
➜ rails-dev-box git:(master) ✗ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
➜ rails-dev-box git:(master) ✗ vagrant destroy
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Forcing shutdown of VM...
[default] Destroying VM and associated drives...
➜ rails-dev-box git:(master) ✗ 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] 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: VagrantPlugins::Puppet::Provisioner::Puppet...
Running Puppet with default.pp...
stdin: is not a tty
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 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:136
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[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 195.36 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 ]
from rails-dev-box.
Its seems your first issue is solved with an upgrade to Vagrant.
The new issue you are having appears to be something to do with installing ruby 2.0.
Relevant part of the output:
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:136
If you vagrant ssh
and then run '/home/vagrant/.rvm/bin/rvm install 2.0.0 --latest-binary --autolibs=enabled && rvm --fuzzy alias create default 2.0.0
it should give you the error output.
from rails-dev-box.
Hi,
I destroyed the vagrant box and then vagrant up it again. This time it didn't fail :)
Thanks for your help.
from rails-dev-box.
Hi, i have the same problem. Destroying the box and running vagrant up again didn't work for me.
I installed Vagrant today, my version is 1.3.5 and VirtualBox 4.2.18.
I cannot even ping google.com, so it seems a problem with the network settings.
vagrant@rails-dev-box:~$ ping google.com
ping: unknown host google.com
I also tried the suggested troubleshooting tips
vagrant@rails-dev-box:~$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]
vagrant@rails-dev-box:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
from rails-dev-box.
@danroux if the virtual machine does not have network vagrant up won't be able to install anything. Does not seem related to the dev box itself.
from rails-dev-box.
Related Issues (20)
- Setup following recommended workflow has bundle errors in mysql2 HOT 7
- Ubuntu 19.04 (disco64) not available HOT 2
- KindleGen is not available for download
- Is there interest in a Docker-based setup? HOT 8
- `rails` directory us mounted with `root` as an owner HOT 1
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug
- I found a bug HOT 2
- SSD with ext4 partition with Ubuntu 22.10 Not Recognized in BIOS but only in Ubuntu/Windows HOT 1
- Error building native extensions when running bundle install HOT 3
- Ubuntu 24.04 Vagrant image is not available
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-dev-box.