http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul/22384591#22384591
Last login: Sat May 17 08:35:42 on console
Narumis-MacBook-Air:~ narumi$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Narumis-MacBook-Air:~ narumi$ rails -v
Rails 4.0.3
Narumis-MacBook-Air:~ narumi$ mysql -v
-bash: mysql: command not found
Narumis-MacBook-Air:~ narumi$ sudo gem install mysql2
Password:
Fetching: mysql2-0.3.16.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/mysql/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/mysql/lib
-----
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
linking shared-object mysql2/mysql2.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [mysql2.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.16 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/mysql2-0.3.16/gem_make.out
Narumis-MacBook-Air:~ narumi$ bundle exec rails s
Could not locate Gemfile
Narumis-MacBook-Air:~ narumi$ bundle -v
Bundler version 1.6.0.rc
Narumis-MacBook-Air:~ narumi$ sudo bundle install
Could not locate Gemfile
Narumis-MacBook-Air:~ narumi$ sudo gem install mysql2 -v0.3.15
Fetching: mysql2-0.3.15.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/mysql/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/mysql/lib
-----
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
linking shared-object mysql2/mysql2.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [mysql2.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.15 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/mysql2-0.3.15/gem_make.out
Narumis-MacBook-Air:~ narumi$
[Restored]
Narumis-MacBook-Air:~ narumi$ sudo gem install git
Password:
Fetching: git-1.2.6.gem (100%)
Successfully installed git-1.2.6
Parsing documentation for git-1.2.6
Installing ri documentation for git-1.2.6
1 gem installed
Narumis-MacBook-Air:~ narumi$ sudo gem install rvm
Fetching: rvm-1.11.3.9.gem (100%)
Successfully installed rvm-1.11.3.9
Parsing documentation for rvm-1.11.3.9
Installing ri documentation for rvm-1.11.3.9
1 gem installed
Narumis-MacBook-Air:~ narumi$ sudo gem install homebrew
ERROR: Could not find a valid gem 'homebrew' (>= 0) in any repository
ERROR: Possible alternatives: hebrew, homespree, homer, home_run, honeydew
Narumis-MacBook-Air:~ narumi$ sudo rvm install mysql2
sudo: rvm: command not found
Narumis-MacBook-Air:~ narumi$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
==> The following directories will have their group set to admin:
/usr/local/.
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/.
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/.
==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 172949, done.
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: protocol error: bad pack header
Failed during: git fetch origin master:refs/remotes/origin/master -n
Narumis-MacBook-Air:~ narumi$ sudo ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Password:
Don't run this as root!
Narumis-MacBook-Air:~ narumi$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
Narumis-MacBook-Air:~ narumi$ rm -rf /usr/local/.git
Narumis-MacBook-Air:~ narumi$ rm -rf /usr/local/brew
Narumis-MacBook-Air:~ narumi$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
Password:
==> Downloading and installing Homebrew...
remote: Counting objects: 172949, done.
remote: Compressing objects: 100% (48276/48276), done.
remote: Total 172949 (delta 123533), reused 172949 (delta 123533)
Receiving objects: 100% (172949/172949), 33.78 MiB | 2.20 MiB/s, done.
Resolving deltas: 100% (123533/123533), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
HEAD is now at 037e06d Move agedu to headonly
==> Installation successful!
==> Next steps
Run `brew doctor` before you install anything
Run `brew help` to get started
Narumis-MacBook-Air:~ narumi$ brew list
Narumis-MacBook-Air:~ narumi$ sudo chown -R $narumi /usr/loacal
Password:
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
Narumis-MacBook-Air:~ narumi$ sudo chown -R narumi /usr/loacal
chown: /usr/loacal: No such file or directory
Narumis-MacBook-Air:~ narumi$ sudo chown -R narumi /usr/local
Narumis-MacBook-Air:~ narumi$ sudo chown -R $narumi /usr/local
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
Narumis-MacBook-Air:~ narumi$ brew doctor
^C
Narumis-MacBook-Air:~ narumi$ brew doctor
Your system is ready to brew.
Narumis-MacBook-Air:~ narumi$ brew install mysql
==> Installing mysql dependency: openssl
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/openssl-1.0.1g.mavericks.bottle.tar.g
######################################################################## 100.0%
==> Pouring openssl-1.0.1g.mavericks.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, so it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
The OpenSSL provided by OS X is too old for some software.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary
???? /usr/local/Cellar/openssl/1.0.1g: 429 files, 15M
==> Installing mysql
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mysql-5.6.17_1.mavericks.bottle.tar.g
######################################################################## 100.0%
==> Pouring mysql-5.6.17_1.mavericks.bottle.tar.gz
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.
To connect:
mysql -uroot
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
==> /usr/local/Cellar/mysql/5.6.17_1/bin/mysql_install_db --verbose --user=narumi --basedir=/usr/local/Cel
==> Summary
???? /usr/local/Cellar/mysql/5.6.17_1: 9510 files, 338M
Narumis-MacBook-Air:~ narumi$ mysql -p
Enter password:
ERROR 1045 (28000): Access denied for user 'narumi'@'localhost' (using password: YES)
Narumis-MacBook-Air:~ narumi$ mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> Ctrl-C -- exit!
Aborted
Narumis-MacBook-Air:~ narumi$ sudo gem install mysql2
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/5.6.17_1/lib
-----
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
linking shared-object mysql2/mysql2.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [mysql2.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.16 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/mysql2-0.3.16/gem_make.out
Narumis-MacBook-Air:~ narumi$ mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Reading history-file /Users/narumi/.mysql_history
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> my sql2 -v
-> Ctrl-C -- exit!
Writing history-file /Users/narumi/.mysql_history
Aborted
Narumis-MacBook-Air:~ narumi$ sqlite3
SQLite version 3.7.13 2012-07-17 17:46:21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
Narumis-MacBook-Air:~ narumi$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> Ctrl-C -- exit!
Aborted
Narumis-MacBook-Air:~ narumi$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install mysql2
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Narumis-MacBook-Air:~ narumi$ sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install mysql2
Password:
ERROR: Could not find a valid gem 'mysql2' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=6 errno=0 state=SSLv3 read finished A (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
Narumis-MacBook-Air:~ narumi$ gem list
*** LOCAL GEMS ***
actionmailer (4.0.3, 2.2.3)
actionpack (4.0.3, 2.2.3)
activemodel (4.0.3)
activerecord (4.0.3, 2.2.3)
activerecord-deprecated_finders (1.0.3)
activeresource (2.2.3)
activesupport (4.0.3, 2.2.3)
arel (4.0.2)
atomic (1.1.15)
builder (3.1.4)
bundler (1.6.0.rc)
CFPropertyList (2.2.0)
erubis (2.7.0)
git (1.2.6)
hike (1.2.3)
i18n (0.6.9)
libxml-ruby (2.6.0)
mail (2.5.4)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.4)
nokogiri (1.5.6)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.3, 2.2.3)
railties (4.0.3)
rake (10.1.1)
rubygems-update (2.2.2)
rvm (1.11.3.9)
sprockets (2.11.0)
sprockets-rails (2.0.1)
sqlite3 (1.3.7)
thor (0.18.1)
thread_safe (0.2.0)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.38)
Narumis-MacBook-Air:~ narumi$ bundle install
Could not locate Gemfile
Narumis-MacBook-Air:~ narumi$ cd /users/narumi/ruby_on_rails/HellowAgain
Narumis-MacBook-Air:HellowAgain narumi$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.
Password:
Installing rake 10.3.2
Using i18n 0.6.9
Using minitest 4.7.5
Installing multi_json 1.10.0
Installing thread_safe 0.3.3
Installing tzinfo 0.3.39
Using activesupport 4.0.3
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.0.3
Using mime-types 1.25.1
Using polyglot 0.3.4
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.0.3
Using activemodel 4.0.3
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using activerecord 4.0.3
Using bundler 1.6.0.rc
Installing coffee-script-source 1.7.0
Installing execjs 2.0.2
Installing coffee-script 2.2.0
Installing thor 0.19.1
Using railties 4.0.3
Installing coffee-rails 4.0.1
Using hike 1.2.3
Installing jbuilder 1.5.3
Installing jquery-rails 3.1.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/narumi/.bundler/tmp/2316/gems/json-1.8.1 for inspection.
Results logged to /Users/narumi/.bundler/tmp/2316/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
Narumis-MacBook-Air:HellowAgain narumi$ gem install json -v '1.8.1'
Fetching: json-1.8.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Narumis-MacBook-Air:HellowAgain narumi$ sudo gem install json -v '1.8.1'
Password:
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
Narumis-MacBook-Air:HellowAgain narumi$ sudo gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
Narumis-MacBook-Air:HellowAgain narumi$ clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
Narumis-MacBook-Air:HellowAgain narumi$ sudo ARCHFLAGS=Wno-error=unused-command-line-argument-hard-error-in-future gem install json -v '1.8.1'
Password:
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
clang: error: no such file or directory: 'Wno-error=unused-command-line-argument-hard-error-in-future'
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
Narumis-MacBook-Air:HellowAgain narumi$ bundle list
Could not find gem 'sdoc (>= 0) ruby' in the gems available on this machine.
Narumis-MacBook-Air:HellowAgain narumi$ gem list
*** LOCAL GEMS ***
actionmailer (4.0.3, 2.2.3)
actionpack (4.0.3, 2.2.3)
activemodel (4.0.3)
activerecord (4.0.3, 2.2.3)
activerecord-deprecated_finders (1.0.3)
activeresource (2.2.3)
activesupport (4.0.3, 2.2.3)
arel (4.0.2)
atomic (1.1.15)
builder (3.1.4)
bundler (1.6.0.rc)
CFPropertyList (2.2.0)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
erubis (2.7.0)
execjs (2.0.2)
git (1.2.6)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
jquery-rails (3.1.0)
libxml-ruby (2.6.0)
mail (2.5.4)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.10.0, 1.8.4)
nokogiri (1.5.6)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.3, 2.2.3)
railties (4.0.3)
rake (10.3.2, 10.1.1)
rubygems-update (2.2.2)
rvm (1.11.3.9)
sprockets (2.11.0)
sprockets-rails (2.0.1)
sqlite3 (1.3.7)
thor (0.19.1, 0.18.1)
thread_safe (0.3.3, 0.2.0)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.39, 0.3.38)
Narumis-MacBook-Air:HellowAgain narumi$ gem uninstall sqlite3
ERROR: While executing gem ... (Gem::InstallError)
sqlite3 is not installed in GEM_HOME, try:
gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 sqlite3
Narumis-MacBook-Air:HellowAgain narumi$ gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 sqlite3
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 directory.
Narumis-MacBook-Air:HellowAgain narumi$ sudo gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 sqlite3
Password:
Successfully uninstalled sqlite3-1.3.7
Narumis-MacBook-Air:HellowAgain narumi$ gem list
*** LOCAL GEMS ***
actionmailer (4.0.3, 2.2.3)
actionpack (4.0.3, 2.2.3)
activemodel (4.0.3)
activerecord (4.0.3, 2.2.3)
activerecord-deprecated_finders (1.0.3)
activeresource (2.2.3)
activesupport (4.0.3, 2.2.3)
arel (4.0.2)
atomic (1.1.15)
builder (3.1.4)
bundler (1.6.0.rc)
CFPropertyList (2.2.0)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
erubis (2.7.0)
execjs (2.0.2)
git (1.2.6)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
jquery-rails (3.1.0)
libxml-ruby (2.6.0)
mail (2.5.4)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.10.0, 1.8.4)
nokogiri (1.5.6)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.3, 2.2.3)
railties (4.0.3)
rake (10.3.2, 10.1.1)
rubygems-update (2.2.2)
rvm (1.11.3.9)
sprockets (2.11.0)
sprockets-rails (2.0.1)
thor (0.19.1, 0.18.1)
thread_safe (0.3.3, 0.2.0)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.39, 0.3.38)
Narumis-MacBook-Air:HellowAgain narumi$ sudo gem install json -v '1.8.1'
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
Narumis-MacBook-Air:HellowAgain narumi$ rvm -v
-bash: rvm: command not found
Narumis-MacBook-Air:HellowAgain narumi$ gem -h
RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.
Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]
Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install
Further help:
gem help commands list all 'gem' commands
gem help examples show some examples of usage
gem help platforms show information about platforms
gem help <COMMAND> show help on COMMAND
(e.g. 'gem help install')
gem server present a web page at
http://localhost:8808/
with info about installed gems
Further information:
http://guides.rubygems.org
Narumis-MacBook-Air:HellowAgain narumi$ ARCHFLAGS=Wno-error=unused-command-line-argument-hard-error-in-future sudo gem install json -v '1.8.1'
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/json-1.8.1/gem_make.out
Narumis-MacBook-Air:gems narumi$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Narumis-MacBook-Air:gems narumi$ rvm install ruby-2.0.0-p451
-bash: rvm: command not found
Narumis-MacBook-Air:gems narumi$ gem install ruby-2.0.0-p451
ERROR: Could not find a valid gem 'ruby-2.0.0-p451' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - no such name (https://api.rubygems.org/latest_specs.4.8.gz)
^CERROR: Interrupted
Narumis-MacBook-Air:gems narumi$ brew install rvm
Error: No available formula for rvm
Searching taps...
Narumis-MacBook-Air:gems narumi$ \curl -L https://get.rvm.io | bash -s stable --ruby
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-100 184 100 184 0 0 22 0 0:00:08 0:00:08 --:--:-- 22
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:12 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:13 --:--:- 0 20511 0 0 0 0 0 0 --:--:-- 0:00:14 --:--:- 39 20511 39 8192 0 0 545 0 0:00:37 0:00:15 0:00:2 79 20511 79 16384 0 0 1014 0 0:00:20 0:00:16 0:00:0100 20511 100 20511 0 0 1270 0 0:00:16 0:00:16 --:--:-- 5900
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
Installing RVM to /Users/narumi/.rvm/
Adding rvm PATH line to /Users/narumi/.profile /Users/narumi/.bashrc /Users/narumi/.zshrc.
Adding rvm loading line to /Users/narumi/.bash_profile /Users/narumi/.zlogin.
Installation of RVM in /Users/narumi/.rvm/ is almost complete:
* To start using RVM you need to run `source /Users/narumi/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# narumi,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
rvm 1.25.25 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/osx/10.9/x86_64/ruby-2.1.1.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba......
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
ruby-2.1.1 - #configure
ruby-2.1.1 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:- 1 6671k 1 98045 0 0 33858 0 0:03:21 0:00:02 0:03:1 9 6671k 9 607k 0 0 156k 0 0:00:42 0:00:03 0:00:3 17 6671k 17 1183k 0 0 232k 0 0:00:28 0:00:05 0:00:2 19 6671k 19 1327k 0 0 218k 0 0:00:30 0:00:06 0:00:2 26 6671k 26 1775k 0 0 253k 0 0:00:26 0:00:07 0:00:1 30 6671k 30 2047k 0 0 248k 0 0:00:26 0:00:08 0:00:1 35 6671k 35 2367k 0 0 267k 0 0:00:24 0:00:08 0:00:1 42 6671k 42 2815k 0 0 287k 0 0:00:23 0:00:09 0:00:1 49 6671k 49 3311k 0 0 306k 0 0:00:21 0:00:10 0:00:1 56 6671k 56 3791k 0 0 320k 0 0:00:20 0:00:11 0:00:0 63 6671k 63 4239k 0 0 331k 0 0:00:20 0:00:12 0:00:0 70 6671k 70 4735k 0 0 343k 0 0:00:19 0:00:13 0:00:0 78 6671k 78 5263k 0 0 356k 0 0:00:18 0:00:14 0:00:0 87 6671k 87 5823k 0 0 369k 0 0:00:18 0:00:15 0:00:0 97 6671k 97 6495k 0 0 386k 0 0:00:17 0:00:16 0:00:0100 6671k 100 6671k 0 0 391k 0 0:00:17 0:00:17 --:--:-- 574k
ruby-2.1.1 - #validate archive
ruby-2.1.1 - #extract
ruby-2.1.1 - #validate binary
ruby-2.1.1 - #setup
ruby-2.1.1 - #making binaries executable..
Rubygems 2.2.2 already available in installed ruby, skipping installation, use --force to reinstall.
ruby-2.1.1 - #gemset created /Users/narumi/.rvm/gems/ruby-2.1.1@global
ruby-2.1.1 - #importing gemset /Users/narumi/.rvm/gemsets/global.gems.|
ruby-2.1.1 - #generating global wrappers.........
ruby-2.1.1 - #gemset created /Users/narumi/.rvm/gems/ruby-2.1.1
ruby-2.1.1 - #importing gemsetfile /Users/narumi/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.1 - #generating default wrappers.........
Updating certificates in '/etc/openssl/cert.pem'.
mkdir: /etc/openssl: Permission denied
narumi password required for 'mkdir -p /etc/openssl':
Creating alias default for ruby-2.1.1...
* To start using RVM you need to run `source /Users/narumi/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
Narumis-MacBook-Air:gems narumi$ [[ -s "/Users/narumi/.rvm/scripts/rvm" ]]&& . "/Users/narumi/.rvm/scripts/rvm"
Narumis-MacBook-Air:gems narumi$ rvm -v
rvm 1.25.25 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
Narumis-MacBook-Air:gems narumi$ rvm install json
Unrecognized command line argument: 'json' ( see: 'rvm usage' )
Narumis-MacBook-Air:gems narumi$ rvm usage
= rvm
* https://rvm.io/
* https://github.com/wayneeseguin/rvm/
== DESCRIPTION:
RVM is the Ruby enVironment Manager (rvm).
It manages Ruby application environments and enables switching between them.
== Installation
curl -L https://get.rvm.io | bash -s stable --autolibs=enabled [--ruby] [--rails] [--trace]
stable :: Install stable RVM, good for servers.
--ruby :: Additionally install latest ruby version (MRI).
--rails :: Install gem rails into default gemset (also installs ruby=).
--trace :: Print trace of the installation, gist output when you have problems.
--autolibs :: Enable or disable autolibs see: https://rvm.io/rvm/autolibs
More details here: https://rvm.io/rvm/install/
== Usage
rvm [Flags] [Options] Action [Implementation[,Implementation[,...]]
== Flags
--default :: with 'rvm use X', sets the default ruby for new shells to X.
--debug :: Toggle debug mode on for very verbose output.
--disable-binary :: Install from source instead of using binaries
--trace :: Toggle trace mode on to see EVERYTHING rvm is doing.
--force :: Force install, removes old install & source before install.
--summary :: Used with rubydo to print out a summary of the commands run.
--latest :: with gemset --dump skips version strings for latest gem.
--gems :: with uninstall/remove removes gems with the interpreter.
--docs :: with install, attempt to generate ri after installation.
--reconfigure :: Force ./configure on install even if Makefile already exists.
--skip-gemsets :: with install, skip the installation of default gemsets.
--quiet-curl :: Makes curl silent when fetching data
== Options
-v|--version :: Emit rvm version loaded for current shell
-l|--level :: patch level to use with rvm use / install
--bin :: path for binaries to be placed (~/.rvm/bin/)
-S :: Specify a script file to attempt to load and run (rubydo)
-e :: Execute code from the command line.
--gems :: Used to set the 'gems_flag', use with 'remove' to remove
gems
--archive :: Used to set the 'archive_flag', use with 'remove' to remove
archive
--patch :: With MRI Rubies you may specify one or more full paths to
patches
for multiple, specify comma separated:
--patch /.../.../a.patch[%prefix],/.../.../.../b.patch
'prefix' is an optional argument, which will be bypassed
to the '-p' argument of the 'patch' command. It is separated
from patch file name with '%' symbol.
-C|--configure :: custom configure options. If you need to pass several
configure options then append them comma separated:
-C --...,--...,--...
--nice :: process niceness (for slow computers, default 0)
--ree-options :: Options passed directly to ree's './installer' on the
command line.
--with-rubies :: Specifies a string for rvm to attempt to expand for set
operations.
== Action
(Note: for most actions, 'rvm help action-name' may provide more information.)
*usage* :: show this usage information
version :: show the rvm version installed in rvm_path
use :: setup current shell to use a specific ruby version
reload :: reload rvm source itself (useful after changing rvm source)
implode :: (seppuku) removes the rvm installation completely.
This means everything in $rvm_path (~/.rvm || /usr/local/rvm).
This does not touch your profiles. However, this means that you
must manually clean up your profiles and remove the lines which
source RVM.
get
请发表评论