2013年8月24日土曜日

RVMの基本コマンド

こちらのサイト様がとてもよくまとまっていたので。

http://blog.asial.co.jp/371

2013年8月7日水曜日

twitter-bootstrapを入れたときの各GemのVersion

Using rake (10.1.0)
Using i18n (0.6.4)
Using multi_json (1.7.8)
Using activesupport (3.2.8)
Using builder (3.0.4)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.3)
Using tilt (1.4.1)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.23)
Using polyglot (0.3.3)
Using treetop (1.4.14)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Installing bootstrap-sass (2.0.3.1)
Using bundler (1.2.3)
Using coffee-script-source (1.6.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.8.0)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.8)
Using coffee-rails (3.2.2)
Using commonjs (0.2.6)
Using jquery-rails (3.0.4)
Using less (2.3.2)
Using less-rails (2.3.3)
Using libv8 (3.3.10.4)
Using rails (3.2.8)
Installing sass (3.2.10)
Installing sass-rails (3.2.6)
Using sqlite3 (1.3.7)
Using therubyracer (0.10.2)
Using twitter-bootstrap-rails (2.2.7)
Using uglifier (2.1.2)


2013年8月6日火曜日

twitter-bootstrapを使う際にはまったこと

libv8がインストールできなかった。
なので、therubyraceも入れられず、はまった。

Gemfileに以下のVersionを指定したらうまくできた。

group :assets do
       gem 'libv8', '~> 3.3.10'
       gem 'therubyracer', '~> 0.10.2'
end

はまったときのログは、以下の感じ。
Installing libv8 (3.16.14.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/ruby-1.9.3-head/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.5.6
Using compiler: /opt/local/bin/g++
g++: error: unrecognized command line option '-Wnewline-eof'


GCCをいれる

$ port search gcc

と打つと、下のようなリストが表示されます。

gcc42 @4.2.4 (lang)
    The GNU compiler collection

gcc43 @4.3.6 (lang)
    The GNU compiler collection

gcc44 @4.4.7 (lang)
    The GNU compiler collection

gcc45 @4.5.4 (lang)
    The GNU compiler collection

gcc46 @4.6.3 (lang)
    The GNU compiler collection

gcc47 @4.7.1 (lang)
    The GNU compiler collection

gcc48 @4.8-20120826 (lang)
    The GNU compiler collection, prerelease BETA

gcc_select @0.1 (sysutils)
    common files for selecting default gcc version

これは抜粋ですが、GCCを入れるだけなら、ここだけ見ればOK。
このリストから、入れたいものを下のようにコマンド打っていれるだけ。

$ sudo port install gcc47

複数のGCCが入っているから、Versionがわかりません
➡ $ sudo port select --list gcc

ActiveのGCCのVersionは?
 $ gcc --version

GCCのVersionってどうやって切り替えるの?
➡ $ sudo port install gcc_select の後に
$ sudo port select gcc mp-gcc4