title: Myapp::Application::Railties constant missing with Rails 4 beta and Jruby jruby-1.7.2
body: <p>I couldn't get jruby to work with Rails 4 without a hack:</p>
  
  <p>In railties/lib/rails/engine.rb, I had to initialize Railties with const_get, otherwise</p>
  
  <pre><code>def railties
    @railties ||= self.class.const_get(:Railties).new
    # @railties ||= self.class::Railties.new
   end
  </code></pre>
  
  <p>Otherwise I get this:</p>
  
  <p>./bin/rake
  rake aborted!
  uninitialized constant Myapp::Application::Railties
  org/jruby/RubyModule.java:2677:in <code>const_missing'
  /Volumes/Opt/rails/rails-edge/railties/lib/rails/engine.rb:469:in</code>railties'
  /Volumes/Opt/rails/rails-edge/railties/lib/rails/application.rb:241:in <code>run_tasks_blocks'
  /Volumes/Opt/rails/rails-edge/railties/lib/rails/engine.rb:444:in</code>load_tasks'
  org/jruby/RubyBasicObject.java:1659:in <code>__send__'
  org/jruby/RubyKernel.java:2086:in</code>send'
  /Volumes/Opt/rails/rails-edge/railties/lib/rails/railtie/configurable.rb:30:in <code>method_missing'
  /Volumes/Opt/projects/myapp/Rakefile:6:in</code>(root)'
  org/jruby/RubyKernel.java:1046:in `load'</p>
  
  <p>Rails itself won't start up for the same reason.  Is this the correct fix or did I mask some underlying problem?  </p>