ハイパーニートプログラマーへの道

頑張ったり頑張らなかったり

2017-01-01から1年間の記事一覧

【Ruby on Rails】dyld: lazy symbol binding failed: Symbol not found: というエラーが出たので

Rails version 4.2.10 Ruby version 2.2.8-p477 (x86_64-darwin17) Mac OS X 10.13.1 bin/rake spec を走らせた時に以下のようなエラーが出るようになりました $ ./bin/rake spec dyld: lazy symbol binding failed: Symbol not found: __ZN2v82V821AddGCPro…

【Rails】ファイルアップロードのテスト時のFactoryGirl (FactoryBot) の設定

Mac OS X Sierra 10.12.6 Ruby version 2.1.2-p95 (x86_64-darwin16.0) Rails version 4.1.16 このようにしていまして FactoryGirl.define do # 中略 factory :content_figure do content do ActionDispatch::Http::UploadedFile.new( filename: 'figure.png…

【Rails】ファイルアップロードのテストにてMiniMagickのValidationがfailedするとき

Mac OS X Sierra 10.12.6 Ruby version 2.1.2-p95 (x86_64-darwin16.0) Rails version 4.1.16 carrierwave (0.10.0) RSpec + FactoryGirl (FactoryBot) でファイルアップロードが絡むテストを走らせたときに、以下のようなエラーに遭遇 Validation failed: F…

【Ruby on Rails】content_tagでmultipleなselectタグを生成する

要するにこういう感じです https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple 複数の要素を選択できる select タグを作ろうと こちらを参考にやってみました https://rubyplus.com/articles/3411-Tag-View-Helpers-in-Rails-5 Rai…

【Ubuntu 16.04】MySQLを自動起動できるようにする

sysv-rc-confのインストール $ sudo apt-cache search sysv-rc-conf sysv-rc-conf - SysV init runlevel configuration tool for the terminal $ sudo apt-get install sysv-rc-conf mysql の自動起動設定 $ sudo sysv-rc-conf --list (中略) mysql # なん…

【RSpec】 Capybara + poltergeist にて rspec failed to detect theversion of the executable at '/usr/bin/phantomjs'

Ubuntu16.04上に構築しているRailsにてfeature spec (capybara + poltergeist) を走らせたときに rspec failed to detect theversion of the executable at '/usr/bin/phantomjs' とかなんとかエラーでこける。 ちょっと古いですがこちらを見ると stackoverf…