Tag: Rails/トラブルシューティング
gem 'therubyracer', '0.12.1' gem 'libv8', '3.16.14.7'
gem 'therubyracer', '0.12.1' gem 'libv8', '3.16.14.11'
Uncaught exception: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile
gem 'mysql2', '~> 0.3.18'
def initialize super # 初期化処理 end
config.serve_static_files = true config.assets.compile = true
module Mymod require 'date' RubyDate = Date Date = nil class ClassA class Date < Mymod::ClassA def initialize today = RubyDate.today # get today's date from Ruby's Date class puts "Today's date is #{today.to_s}" end end end end Mymod::ClassA::Date.new # => Today's date is 2014-01-05
config.autoload_paths += Dir["#{Rails.root}/lib"] # 追加
brew update brew rm imagemagick brew install imagemagick@6 brew link imagemagick@6 --force
export PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig
export NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle config build.nokogiri --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
xcode-select --install
$ bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
brew rm imagemagick brew install imagemagick@6 PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig gem install rmagick