2012年6月13日水曜日

mac lionで $ rvm install 1.9.1 が出来ない。

$ rvm get latest
$ rvm reload
$ rvm version

rvm 1.14.1 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

$ rvm install 1.9.1
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

LLVMじゃコンパイルは出来ねーぞみたいなことが書いてある。

gccが入ってあるか探す。

$ ls /usr/bin/ | grep gcc
gcc
i686-apple-darwin11-llvm-gcc-4.2
llvm-gcc
llvm-gcc-4.2

コンパイルにgccを使うために環境変数を指定。
$ export CC=gcc


$ rvm install 1.9.1

Ruby 'ruby-1.9.1-p431' was build using clang - but it's not (fully) supported, expect errors.
Please be aware that you just installed a ruby that requires        2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.

Ruby 1.9.3-194を使えよって警告がでたけど気にしない


$ rvm list

rvm rubies

   ruby-1.9.1-p431 [ i386 ]

$ rvm install 1.9.1

できた!

2012年6月8日金曜日

herokuで複数アカウント、

一つのMacに会社と自分のherokuアカウントを使い分ける



$ heroku plugins:install git://github.com/ddollar/heroku-accounts.git


$ heroku accounts:add new_user --auto

Enter your Heroku credentials.
Email: 

Password (typing will be hidden): 




プロジェクト毎にアカウントを設定する。
各プロジェクト毎に利用するHerokuアカウントを設定するには、プロジェクトのディレクトリでaccounts:setサブコマンドを実行する。

$ cd $RAILS_APP

$ heroku accounts:set new_user




herokuのpush先を変更する

$ git remote add heroku git@heroku.new_user:app_name.git



ここのpush先のURLの指定に一番ハマりました。



masterをpush

$ git push heroku master



branch hugeをpush

$ git push heroku hoge:master



参考ページ



2012年6月7日木曜日

evernoteにweb aplictionの申請した時のやり取り

evernote apiを使った、 webアプリケーションが公開出来たので、evernote社とのやり取りについてまとめます。





のformでapiキーを取得する。

すると、

Consumer Key と Consumer Secret が 書かれたメールが帰ってきます。

最初は https://sandbox.evernote.com でテストアカウントを作る必要があります。

これらを使って、開発します。



2,


このページや


でSDKをダウンロードしてどんなものか確かめます。



3,開発が終わったら


からその旨を申請します。

メッセージには、以下の情報をいれないといけないみたい。

メールでやり取りするときにきかれました。



1. アプリケーションの名称
2. アプリケーション提供者の名称

3. アプリケーション提供元のURL

4. 短いアプリケーションの説明


5.電子メールアドレス(アプリケーション提供元のドメインに属するもの)



ここまでできたら、プログラムで使っているurlを


から


に変更したら本番環境でも動きました。