Skip to content

Instantly share code, notes, and snippets.

@dcorking
Last active December 20, 2015 02:29
Show Gist options
  • Save dcorking/6057231 to your computer and use it in GitHub Desktop.
Save dcorking/6057231 to your computer and use it in GitHub Desktop.
Installing capybara-webkit gem on a nitrous.io VM with ruby 1.9.3
cd src/ && make -f Makefile.webkit_server
make[1]: Entering directory `/home/action/.rvm/gems/ruby-2.0.0-p195/gems/capybara-webkit-1.0.0/src'
g++ -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I. -x c++-header -c stable.h -o webkit_server.gch/c++
In file included from /usr/include/c++/4.6/sstream:580:0,
from stable.h:39:
/usr/include/c++/4.6/bits/sstream.tcc:288:1: fatal error: can’t write PCH file: No space left on device
compilation terminated.
Preprocessed source stored into /tmp/ccsZAyIK.out file, please attach this to your bugreport.
make[1]: *** [webkit_server.gch/c++] Error 1
make[1]: Leaving directory `/home/action/.rvm/gems/ruby-2.0.0-p195/gems/capybara-webkit-1.0.0/src'
make: *** [sub-src-webkit_server-pro-make_default-ordered] Error 2
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
Building has failed. See above output for more information on the failure.
Gem files will remain installed in /home/action/.rvm/gems/ruby-2.0.0-p195/gems/capybara-webkit-1.0.0 for inspection.
Results logged to /home/action/.rvm/gems/ruby-2.0.0-p195/gems/capybara-webkit-1.0.0/./gem_make.out
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 500G 97G 404G 20% /
/run 1.7G 40K 1.7G 1% /run
$ rvm use 1.9.3
Using /home/action/.rvm/gems/ruby-1.9.3-p448
$ gem install capybara-webkit -v '1.0.0' --verbose
...
/home/action/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/ports/archives/libxslt-1.1.26.tar.gz
Building native extensions. This could take a while...
ERROR: While executing gem ... (Errno::EDQUOT)
Disk quota exceeded - /home/action/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 500G 97G 404G 20% /
/run 1.7G 40K 1.7G 1% /run
$
action@siarnaq-base-17692:~$ rvm use 1.9.3
Using /home/action/.rvm/gems/ruby-1.9.3-p448
action@siarnaq-base-17692:~$ rvm remove 2.0.0
mkdir: cannot create directory `/home/action/.rvm/log/ruby-2.0.0-p247': Disk quota exceeded
/home/action/.rvm/src/ruby-2.0.0-p247 has already been removed.
/home/action/.rvm/rubies/ruby-2.0.0-p247 has already been removed.
Removing ruby-2.0.0-p247 aliases...
Removing ruby-2.0.0-p247 wrappers...
Removing ruby-2.0.0-p247 environments...
Removing ruby-2.0.0-p247 binaries...
action@siarnaq-base-17692:~$ who
action pts/1 2013-07-22 21:02 (109.176.199.189)
action@siarnaq-base-17692:~$ rvm list
rvm rubies
ruby-1.9.3-p448 [ x86_64 ]
=* ruby-2.0.0-p195 [ x86_64 ]
# => - current
# =* - current && default
# * - default
action@siarnaq-base-17692:~$ ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-linux]
action@siarnaq-base-17692:~$
# Nitrous support deleted the ruby by patch version which worked. Then I had to delete all the unwanted gemsets.
action@siarnaq-base-17692:~/.rvm/gems$ rvm disk-usage gemsets
Gemsets Usage: 253M
action@siarnaq-base-17692:~/.rvm/gems$ rvm remove ruby-2.0.0-p195
/home/action/.rvm/src/ruby-2.0.0-p195 has already been removed.
/home/action/.rvm/rubies/ruby-2.0.0-p195 has already been removed.
Removing ruby-2.0.0-p195 aliases...
Removing ruby-2.0.0-p195 wrappers...
Removing ruby-2.0.0-p195 environments...
Removing ruby-2.0.0-p195 binaries...
action@siarnaq-base-17692:~/.rvm/gems$ ls
cache ruby-1.9.3-p448 ruby-1.9.3-p448@global ruby-2.0.0-p195 ruby-2.0.0-p195@global
action@siarnaq-base-17692:~/.rvm/gems$ rvm remove ruby-2.0.0-p195 --gems
/home/action/.rvm/src/ruby-2.0.0-p195 has already been removed.
/home/action/.rvm/rubies/ruby-2.0.0-p195 has already been removed.
Removing ruby-2.0.0-p195 gemsets...
Removing ruby-2.0.0-p195 aliases...
Removing ruby-2.0.0-p195 wrappers...
Removing ruby-2.0.0-p195 environments...
Removing ruby-2.0.0-p195 binaries...
action@siarnaq-base-17692:~/.rvm/gems$ du -k --max-depth=1 |sort -rn
52028 .
48764 ./ruby-1.9.3-p448
3264 ./ruby-1.9.3-p448@global
0 ./cache
action@siarnaq-base-17692:~/.rvm/gems$ cd
action@siarnaq-base-17692:~$ du -h --max-depth=2 /home
144M /home/action/.gem
283M /home/action/.rvm
24M /home/action/.nvm
3.4M /home/action/workspace
12K /home/action/.ssh
0 /home/action/.cache
0 /home/action/.emacs.d
454M /home/action
454M /home
action@siarnaq-base-17692:~$ rvm remove ruby-2.0.0-p195 --archive
/home/action/.rvm/src/ruby-2.0.0-p195 has already been removed.
/home/action/.rvm/rubies/ruby-2.0.0-p195 has already been removed.
Removing ruby-2.0.0-p195 archives...
Removing ruby-2.0.0-p195 aliases...
Removing ruby-2.0.0-p195 wrappers...
Removing ruby-2.0.0-p195 environments...
Removing ruby-2.0.0-p195 binaries...
action@siarnaq-base-17692:~$ du -h --max-depth=2 /home
144M /home/action/.gem
283M /home/action/.rvm
24M /home/action/.nvm
3.4M /home/action/workspace
12K /home/action/.ssh
0 /home/action/.cache
0 /home/action/.emacs.d
52028 .
48764 ./ruby-1.9.3-p448
3264 ./ruby-1.9.3-p448@global
0 ./cache
action@siarnaq-base-17692:~/.rvm/gems$ cd
action@siarnaq-base-17692:~$ du -h --max-depth=2 /home
144M /home/action/.gem
283M /home/action/.rvm
24M /home/action/.nvm
3.4M /home/action/workspace
12K /home/action/.ssh
0 /home/action/.cache
0 /home/action/.emacs.d
454M /home/action
454M /home
action@siarnaq-base-17692:~$ rvm remove ruby-2.0.0-p195 --archive
/home/action/.rvm/src/ruby-2.0.0-p195 has already been removed.
/home/action/.rvm/rubies/ruby-2.0.0-p195 has already been removed.
Removing ruby-2.0.0-p195 archives...
Removing ruby-2.0.0-p195 aliases...
Removing ruby-2.0.0-p195 wrappers...
Removing ruby-2.0.0-p195 environments...
Removing ruby-2.0.0-p195 binaries...
action@siarnaq-base-17692:~$ du -h --max-depth=2 /home
144M /home/action/.gem
283M /home/action/.rvm
24M /home/action/.nvm
3.4M /home/action/workspace
12K /home/action/.ssh
0 /home/action/.cache
0 /home/action/.emacs.d
454M /home/action
454M /home
action@siarnaq-base-17692:~$ rvm diskusage gemsets
Unrecognized command line argument: 'diskusage' ( see: 'rvm usage' )
action@siarnaq-base-17692:~$ rvm disk-usage gemsets
Gemsets Usage: 51M
action@siarnaq-base-17692:~$ rvm remove ruby-2.0.0-p195 --archive
/home/action/.rvm/src/ruby-2.0.0-p195 has already been removed.
/home/action/.rvm/rubies/ruby-2.0.0-p195 has already been removed.
Removing ruby-2.0.0-p195 archives...
Removing ruby-2.0.0-p195 aliases...
Removing ruby-2.0.0-p195 wrappers...
Removing ruby-2.0.0-p195 environments...
Removing ruby-2.0.0-p195 binaries...
action@siarnaq-base-17692:~$ du -h --max-depth=2 /home
144M /home/action/.gem
283M /home/action/.rvm
24M /home/action/.nvm
3.4M /home/action/workspace
12K /home/action/.ssh
0 /home/action/.cache
0 /home/action/.emacs.d
454M /home/action
454M /home
action@siarnaq-base-17692:~$ rvm diskusage gemsets
Unrecognized command line argument: 'diskusage' ( see: 'rvm usage' )
action@siarnaq-base-17692:~$ rvm disk-usage gemsets
Gemsets Usage: 51M
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ rvm current
system
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ which ruby
/usr/bin/ruby
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ rvm use 1.9.3
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ ~/.bash_profile
bash: /home/action/.bash_profile: Permission denied
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ . ~/.bash_profile
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ rvm current
system
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ rvm use 1.9.3
Using /home/action/.rvm/gems/ruby-1.9.3-p448
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ gem install nokogiri -v '1.6.0' --verbose
GET http://rubygems.org/specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/specs.4.8.gz
200 OK
Installing gem nokogiri-1.6.0
/home/action/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/.autotest
/home/action/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/.gemtest
...
/home/action/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/ports/archives/libxslt-1.1.26.tar.gz
Building native extensions. This could take a while...
/home/action/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
Extracting...
compiling xslt_stylesheet.c
linking shared-object nokogiri/nokogiri.so
make install
/usr/bin/install -c -m 0755 nokogiri.so /home/action/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri
installing default nokogiri libraries
/home/action/.rvm/gems/ruby-1.9.3-p448/bin/nokogiri
/home/action/.rvm/gems/ruby-1.9.3-p448/bin/nokogiri
Successfully installed nokogiri-1.6.0
1 gem installed
action@siarnaq-base-17692:~/.gem$ du -h --max-depth=2
130M ./ruby/1.9.1
130M ./ruby
6.5M ./specs/rubygems.org%80
7.7M ./specs/rubygems.org%443
15M ./specs
144M .
action@siarnaq-base-17692:~/.gem$ cd ..
action@siarnaq-base-17692:~$ rm -R .gem
...
rm: cannot remove `.gem/specs/rubygems.org%80/quick/Marshal.4.8': Directory not emp
ty
action@siarnaq-base-17692:~/.gem$ ls -la ruby/1.9.1/bin/
ls: cannot access ruby/1.9.1/bin/bundle: No such file or directory
ls: cannot access ruby/1.9.1/bin/chef-apply: No such file or directory
ls: cannot access ruby/1.9.1/bin/chef-client: No such file or directory
ls: cannot access ruby/1.9.1/bin/chef-shell: No such file or directory
ls: cannot access ruby/1.9.1/bin/chef-solo: No such file or directory
ls: cannot access ruby/1.9.1/bin/erubis: No such file or directory
ls: cannot access ruby/1.9.1/bin/knife: No such file or directory
ls: cannot access ruby/1.9.1/bin/ohai: No such file or directory
ls: cannot access ruby/1.9.1/bin/rake: No such file or directory
ls: cannot access ruby/1.9.1/bin/restclient: No such file or directory
ls: cannot access ruby/1.9.1/bin/shef: No such file or directory
total 4
drwxrwxr-x 1 action action 4096 Jul 23 06:38 .
drwxr-xr-x 1 action action 70 Jun 18 23:55 ..
?????????? ? ? ? ? ? bundle
?????????? ? ? ? ? ? chef-apply
?????????? ? ? ? ? ? chef-client
?????????? ? ? ? ? ? chef-shell
?????????? ? ? ? ? ? chef-solo
?????????? ? ? ? ? ? erubis
?????????? ? ? ? ? ? knife
?????????? ? ? ? ? ? ohai
?????????? ? ? ? ? ? rake
?????????? ? ? ? ? ? restclient
?????????? ? ? ? ? ? shef
action@siarnaq-base-17692:~/.gem$ stat bundle
stat: cannot stat `bundle': No such file or directory
action@siarnaq-base-17692:~/.gem$
action@siarnaq-base-17692:~$ du -h --max-depth=1 /home
... (many pages of cannot access)
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/rest-client-1.5.1.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/rest-client-1.6.7.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/rest-client-1.6.0.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/rest-client-1.6.1.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/yajl-ruby-1.1.0.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/rest-client-1.6.3.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/systemu-2.5.2.gemspec': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/latest_specs.4.8': No such file or directory
du: cannot access `/home/action/.gem/specs/rubygems.org%80/specs.4.8': No such file or directory
402M /home/action
402M /home
action@siarnaq-base-17692:~$ rvm list
rvm rubies
ruby-1.9.3-p448 [ x86_64 ]
# Default ruby not set. Try 'rvm alias create default <ruby>'.
# => - current
# =* - current && default
# * - default
action@siarnaq-base-17692:~$ rvm alias create default ruby-1.9.3
Creating alias default for ruby-1.9.3-p448.
Recording alias default for ruby-1.9.3-p448.
Creating default links/files
Saving wrappers to '/home/action/.rvm/bin'........
action@siarnaq-base-17692:~$ rvm list
rvm rubies
=* ruby-1.9.3-p448 [ x86_64 ]
# => - current
# =* - current && default
# * - default
action@siarnaq-base-17692:~$ gem install capybara-webkit -v '1.0.0' --verbose
...
make
ok
make install
ok
Successfully installed mini_portile-0.5.1
Successfully installed nokogiri-1.6.0
Successfully installed mime-types-1.23
Successfully installed rack-1.5.2
Successfully installed rack-test-0.6.2
Successfully installed xpath-2.0.0
Successfully installed capybara-2.1.0
Successfully installed json-1.8.0
Successfully installed capybara-webkit-1.0.0
9 gems installed
action@siarnaq-base-17692:~$ #success!
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ gem install bundler
Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
1 gem installed
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ bundle install
Fetching source index from http://rubygems.org/
Installing rake (10.0.4)
Installing ZenTest (4.9.1) Invalid gemspec in [/home/action/.gem/ruby/1.9.1/specifica
tions/ZenTest-4.9.1.gemspec]: Illformed requirement ["< 2.1, >= 1.8"]
...
Installing twitter-bootstrap-rails (2.2.6)
Errno::EDQUOT: Disk quota exceeded - /home/action/.gem/ruby/1.9.1/gems/twitter-bootstrap-rails-2.2.6
An error occurred while installing twitter-bootstrap-rails (2.2.6), and Bundler
cannot continue.
Make sure that `gem install twitter-bootstrap-rails -v '2.2.6'` succeeds before
bundling.
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$
action@siarnaq-base-17692:~$ du -h --max-depth=1 /home |less
...
du: cannot access `/home/action/.gem/specs/rubygems.org%80/quick/Marshal.4.8/systemu-2.5.2.gemspec': No such file or directory
750M /home/action
750M /home
Double disk quota and rebooted
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$ bundle install
...
Installing capybara (2.0.2)
Installing json (1.8.0)
Installing capybara-webkit (1.0.0) Killed
action@siarnaq-base-17692:~/workspace/LocalSupport(using-cancan)$
# Killed!! who would kill it?
# Same again.
# I should have run this as verbose, instead I made a test bundle
# with only capybara-webkit
# with that installed successfully
# LocalSupport then installed and ran correctly!!
# Note that the box might be a bit low on memory, while LocalSupport preview
# is running in development, box editor says
# 324.5MB of 384MB used
@dcorking
Copy link
Author

Turns out the home directory disk quota was exceeded, making compilers and rvm itself do weird things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment