title: How can I use a Rails engine inside a Sinatra app?
body: <p>I've created a basic Rails engine (I'm using Rails 4), and I've integrated it into my main Rails app via the Gemfile:</p>
  
  <pre><code>gem 'app_core', :path =&gt; '../app_core'
  </code></pre>
  
  <p>I also added that to my Sinatra app, and bundle install said the gem installed there. I'm testing this in my Sintra app like follows:</p>
  
  <pre><code>get '/products.?:format?' do
    AppCore::Product.all.to_json
  end
  </code></pre>
  
  <p>When I do this I get:</p>
  
  <pre><code>NameError at /products
  uninitialized constant AppCore::Product
  </code></pre>
  
  <p>Any ideas how to work around this? Is it possible to integrate an engine into a Sinatra app?</p>