Skip to content

Instantly share code, notes, and snippets.

@yazumoto
Created October 27, 2015 15:19
Show Gist options
  • Select an option

  • Save yazumoto/3959f79e595cce43b0c2 to your computer and use it in GitHub Desktop.

Select an option

Save yazumoto/3959f79e595cce43b0c2 to your computer and use it in GitHub Desktop.
Railsの自動ロードのパスの調べ方 ref: http://qiita.com/seteen/items/67cbf14c513bc04ea789
pry(main)> ActiveSupport::Dependencies.autoload_paths
# これで色々出力される(デフォルトのロードパス?)
=> ["/Users/USERNAME/rails_path/app/assets/*",
...]
pry(main)> YOUR_APPLICATION_NAME::Application.config.autoload_paths # YOUR_APPLICATION_NAMEはconfig/application.rbに記載してあるはずなので見てみよう
# 何も設定していなかったら空
=> []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment