title: Model constants undefined after loading Rails app environment into a Jupyter notebook
body: <p>I come from a Python background and am learning Ruby on Rails.</p>
  
  <p>I wanted to use Jupyter notebooks to manipulate Rails objects as a learning exercise. (I am following the <a href="http://guides.rubyonrails.org/getting_started.html" rel="nofollow">Rails Getting Started Guide</a>.) </p>
  
  <p>After reading several blog posts on how to load a Rails app environment for scripting, I managed to create model instances inside of cells in a Jupyter notebook.</p>
  
  <p>In order to do so, however, I had to call <code>Rails.autoload "Article"</code> in order to create a new instance of an Article. </p>
  
  <p>This is the code running inside of a Jupyter notebook with a Ruby 2.3 kernel. The Rails version is 4.2.6</p>
  
  <pre><code>ENV['RAILS_ENV'] = 'development'
  
  require ::File.expand_path('../config/boot', __FILE__)
  
  require ::File.expand_path('../config/environment', __FILE__)
  
  Rails.autoload "Article"  # if I omit this line, Article is an undefined constant
  
  article  = Article.new(text: "test")
  article.save
  </code></pre>
  
  <p>It seems like I am close to being able to manipulate Rails related objects in my Jupyter notebook.</p>
  
  <p>My question is: What is missing so that I don't have to call <code>Rails.autoload "Article"</code> for Article or any other model?</p>
  
  <p>Thanks in advance.</p>