LoginSignup
3
2

More than 5 years have passed since last update.

twitter-bootstrap-rails、Ruby対応状況について

Posted at

JRubyでtwitter-bootstrap-railsを使おうとしたらハマったので、まとめておく。

賞味期限は2.1.10がリリースされるまでかな?

2.1.6未満


  • therubyracer/libv8に依存している
  • C拡張(-Xcext.enabled=true)を有効にしないとJRubyでは使えない
  • C拡張が無効になっているtravisだと使えない

2.1.6〜2.1.9(最新)


 * libv8のかわにりRhinoを使える。
* CRubyならtherubyracer、JRubyならtherubyrhinoを別途入れる必要がある(?)
* Ruby 1.9のハッシュ記法が使われているので、Ruby 1.8で使えない

bf3d49以降

  • bf3d49で修正された
  • まだこのコミットを含んだバージョンはリリースされていない

まとめ

とりあえず現状(2012-12-30)ではGemfileを以下のようにするのがいい気がする。

gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails', :ref => 'b126c86a57fd0512e296be9f73b0613c34a89bfb'
gem 'therubyracer', :platform => :ruby
gem 'therubyrhino', :platform => :jruby
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2