=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$ vagrant up --no-color
Vagrant failed to initialize at a very early stage:
It appears that you've ran a newer version of Vagrant on thiscomputer. Unfortunately, newer versions of Vagrant change internaldirectory layouts that cause older versions to break. This versionof Vagrant cannot properly run.If you'd like to start from a clean state, please remove the
Vagrant state directory: /Users/twer/.vagrant.d
Warning that this will remove all your boxes and potentially corrupt
existing Vagrant environments that were running based on the future
version.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
$ rm -rf ~/.vagrant.d/
$ vagrant up --no-color
/Users/twer/sourcecode/chef-repo/Vagrantfile:8:in `<top (required)>': undefined method `configure'for Vagrant:Module (NoMethodError) from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `load' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `block in procs_for_source' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/vagrant-1.0.7/lib/vagrant/config.rb:41:in `block in capture_configures'
窝里个去,又出新问题了。那好吧,看看当前ruby的版本。
12345678910111213141516171819202122232425
=======<pre><code class="bash">
$ rm -rf ~/.vagrant.d/
$ vagrant up --no-color
/Users/twer/sourcecode/chef-repo/Vagrantfile:8:in `<top (required)>': undefined method `configure'for Vagrant:Module (NoMethodError) from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `load' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/vagrant-1.0.7/lib/vagrant/config/loader.rb:115:in `block in procs_for_source' from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/vagrant-1.0.7/lib/vagrant/config.rb:41:in `block in capture_configures'</code></pre>
<p>窝里个去,又出新问题了。那好吧,看看当前ruby的版本。</p>
<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$ rvm list
rvm rubies
ruby-1.9.2-p320 [ x86_64 ]=* ruby-1.9.3-p194 [ x86_64 ]<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
# => - current# =* - current && default# * - default
=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$ rvm use ruby-1.9.2-p320
Using /usr/local/rvm/gems/ruby-1.9.2-p320
$ vagrant up
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] 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
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
==> make bootstrap=======<pre><code class="bash">
==> make bootstrap
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
configure: error: cannot compute suffix of object files: cannot compile
See `config.log'for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
$ brew install gcc49==> Downloading ftp://gcc.gnu.org/pub/gcc/snapshots/4.9-20130915/gcc-4.9-20130915.tar.bz2
=======<pre><code class="bash">
$ brew install gcc49==> Downloading ftp://gcc.gnu.org/pub/gcc/snapshots/4.9-20130915/gcc-4.9-20130915.tar.bz2
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
Already downloaded: /Library/Caches/Homebrew/gcc49-4.9-20130915.tar.bz2
==> ../configure --build=x86_64-apple-darwin12.5.0 --prefix=/usr/local/Cellar/gcc49/4.9-20130915/gcc
==> make bootstrap==> make install==> Caveats
This is a snapshot of GCC trunk, which is in active development and
supposed to have bugs and should not be used in production
environment.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
==> Summary
🍺 /usr/local/Cellar/gcc49/4.9-20130915: 977 files, 93M, built in 21.6 minutes
==> Summary
🍺 /usr/local/Cellar/gcc49/4.9-20130915: 977 files, 93M, built in 21.6 minutes
=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$ rvm requirements
Checking requirements for osx.
Installing requirements for osx.
mkdir: /usr/local/rvm/log/1379829979_ruby-1.9.3-p448: Permission denied
tee: /usr/local/rvm/log/1379829979_ruby-1.9.3-p448/update_system.log: No such file or directory
tee: /usr/local/rvm/log/1379829979_ruby-1.9.3-p448/update_system.log: No such file or directory
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
rake aborted!
You have already activated rake 10.0.0, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:31:in `block in setup'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/runtime.rb:17:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler.rb:116:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.2.3/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/twer/sourcecode/octopress/Rakefile:2:in `<top (required)>'
(See full trace by running task with --trace)
>>>>>>> 09615b67c1384817f01948313cc9bfa79d82b402:blog/tags/ruby/atom.xml
=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
current path: /Users/twer
command(3): requirements_osx_brew_libs_install libksba openssl
Error: No such keg: /usr/local/Cellar/libksba
Error: Cowardly refusing to `sudo brew install`You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
There were package installation errors, make sure to read the log.
Try `brew tap --repair` and make sure `brew doctor` looks reasonable.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$ sudo brew install libksba
Error: Cowardly refusing to `sudo brew install`You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p448.
Continuing with compilation. Please read'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p448, this may take a while depending on your cpu(s)...
ruby-1.9.3-p448 - #downloading ruby-1.9.3-p448, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0Warning: Failed to create the file ruby-1.9.3-p448.tar.bz2: Permission denied
0 9816k 0 745 0 0 320 0 8:43:34 0:00:02 8:43:32 2623
curl: (23) Failed writing body (0 != 745)There was an error(23).
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file ruby-1.9.3-p448.tar.bz2: Permission denied
0 9816k 0 3329 0 0 4578 0 0:36:35 --:--:-- 0:36:35 8853
curl: (23) Failed writing body (0 != 3329)There was an error(23).
Failed download
There has been an error fetching the ruby interpreter. Halting the installation.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
=======<pre><code class="bash">
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
sudo rvm install 1.9.3
Password:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p448.
Continuing with compilation. Please read'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p448, this may take a while depending on your cpu(s)...
ruby-1.9.3-p448 - #downloading ruby-1.9.3-p448, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9816k 100 9816k 0 0 422k 0 0:00:23 0:00:23 --:--:-- 154k
ruby-1.9.3-p448 - #extracting ruby-1.9.3-p448 to /usr/local/rvm/src/ruby-1.9.3-p448ruby-1.9.3-p448 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p448ruby-1.9.3-p448 - #configuring...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................ruby-1.9.3-p448 - #post-configurationruby-1.9.3-p448 - #compiling...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ruby-1.9.3-p448 - #installing.........................................................................................................curl: (35) Unknown SSL protocol error in connection to rubygems.org:443
There was an error while trying to resolve rubygems version for'latest'.
Halting the installation.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
$ sudo rvm reinstall 1.9.3
Removing /usr/local/rvm/src/ruby-1.9.3-p448...
Removing /usr/local/rvm/rubies/ruby-1.9.3-p448...
=======<pre><code>
最后,再重新安装Ruby。
</code></pre>
<p>$ sudo rvm reinstall 1.9.3
Removing /usr/local/rvm/src/ruby-1.9.3-p448…
Removing /usr/local/rvm/rubies/ruby-1.9.3-p448…
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p448.
Continuing with compilation. Please read ‘rvm help mount’ to get more information on binary rubies.
Checking requirements for osx_brew.
Certificates in ‘/usr/local/etc/openssl/cert.pem’ already are up to date.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p448, this may take a while depending on your cpu(s)…
ruby-1.9.3-p448 - #downloading ruby-1.9.3-p448, this may take a while depending on your connection…ruby-1.9.3-p448 - #extracting ruby-1.9.3-p448 to /usr/local/rvm/src/ruby-1.9.3-p448ruby-1.9.3-p448 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p448ruby-1.9.3-p448 - #configuring………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….ruby-1.9.3-p448 - #post-configurationruby-1.9.3-p448 - #compiling……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………..ruby-1.9.3-p448 - #installing……………………………………………………………………………………………Retrieving rubygems-2.1.4
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
100 356k 100 356k 0 0 11672 0 0:00:31 0:00:31 --:--:-- 20611
Extracting rubygems-2.1.4 ...
Removing old Rubygems files...
=======100 356k 100 356k 0 0 11672 0 0:00:31 0:00:31 –:–:– 20611
Extracting rubygems-2.1.4 …
Removing old Rubygems files…
>>>>>>> b3de9a0dc5638d86b43bb607c665e95f3c151147:blog/tags/ruby/atom.xml
$LANG was empty, setting up LANG=en_US, if it fails again try setting LANG to something sane and try again.
Installing rubygems-2.1.4 for ruby-1.9.3-p448…………………………………………………………………………………………………………………………..
Installation of rubygems completed successfully.
<<<<<<< HEAD:source/_posts/2013-09-23-not-easy-to-install-ruby.markdown
Saving wrappers to '/usr/local/rvm/wrappers/ruby-1.9.3-p448'........
ruby-1.9.3-p448 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).ruby-1.9.3-p448 - #importing default gemsets, this may take time.......................Install of ruby-1.9.3-p448 - #completeMaking gemset ruby-1.9.3-p448 pristine....
Making gemset ruby-1.9.3-p448@global pristine....
In some cases, running executables without bundle exec may work, if the executable happens to be installed in your system and does not pull in any gems that conflict with your bundle. However, this is unreliable and is the source of considerable pain. Even if it looks like it works, it may not work in the future or on another machine.