LoginSignup
15
17

More than 5 years have passed since last update.

Ruby on Railsチュートリアル中のメモ

Last updated at Posted at 2015-02-09

詰まったとことか

http://railstutorial.jp/ にそって学習中に詰まったところのメモを残しておく。

1章

  • Versionまわり
    • Herokuに対応してないバージョン等ある
    • $ rvm hogehogeでなんとか

2章

3章

  • $ bundle install

    • Bundler could not find compatible versions for gem "sprockets-rails": In snapshot (Gemfile.lock): sprockets-rails (2.2.4) In Gemfile: rails (= 4.0.5) ruby depends on sprockets-rails (~> 2.0.0) ruby Running bundle update will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict.
    • $ bundle updateをするといくつかgem install しろみたいなことを言われた
      • 赤文字が消えるまでgem installしたらbundle installもできた
  • $ rails generate rspec:install

    • /Users/Hiroki/Documents/RoR/sample_app/config/environments/development.rb:1:in <top (required)>': undefined methodconfigure' for #SampleApp::Application:0x007f8698ca0de8 (NoMethodError)
      • development.rb の一行目の修正(2章と同様)
  • $ bundle exec rspec spec/requests/static_pages_spec.rb

    • /Users/Hiroki/Documents/RoR/sample_app/config/environments/test.rb:1:in <top (required)>': undefined methodconfigure' for #SampleApp::Application:0x007fec45018798 (NoMethodError)
      • config/environments/test.rbの一行目修正(いつもの)

4章

とくになし

5章

とくになし

6章

とくになし

7章

8章

  • とくになし

9章

  • edit.html.erb作成後のテスト実行
    • 24行目 <%= gravatar_for @user %>がタイポ
    • <%= gravator_for @user %>に修正
15
17
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
15
17