コードビート

プログラミングのメモ




Rails4への移行時に出る、 DEPRECATION WARNING: config.whiny_nils option is deprecated and no longer works.

 

Rails3からRails4へ移行しようとするも、表題のエラーが出てプリコンパイルが通らない。

 

 

config/environments/development.rbの下記の行をコメントアウトする。

 

 # Log error messages when you accidentally call methods on nil 

 config.whiny_nils = true

 

 

 

参考にさせて頂いた記事:

Update-rails4 - Nakajijapan

http://nakajijapan.github.io/blog/2013/07/13/update-rails4/

.make-grid-columns is undefined というBootswatch絡みのエラー

bundle updateした後、

loader.css.less にて宣言されてませんよというエラーが出る。

 

.make-grid-columns is undefined

 

 

bootswatchのバージョンが上がってしまったことが原因。

Gemfileで相応しいバージョンを指定する。

 

gem 'twitter-bootswatch-rails', '3.0.0'

gem 'twitter-bootswatch-rails-helpers', '3.0.0'

 

 

bundle installして解決。

bundle install時の "You may need to add a javascript runtime"

 

bundle install時に出るエラー、というか忠告。

 

     Post-install message from twitter-bootswatch-rails:

       Important: You may need to add a javascript runtime to your Gemfile in order for bootstrap's LESS files to compile to CSS.

       **********************************************

       ExecJS supports these runtimes:

       therubyracer - Google V8 embedded within Ruby

       therubyrhino - Mozilla Rhino embedded within JRuby

       Node.js

       ********************************************** 

 

解決したコマンド。

 

gem install execjs

 

 

 

Gemfileにexecjs書くのではなく、gem installで入れよということ。