title: Integrating refinerycms into an existing rails application
body: <p>I tried incorporating refinerycms in my application following this <a href="http://www.refinerycms.com/guides/with-an-existing-rails-app" rel="nofollow">documentation</a>. After adding the gem to the gemfile and running bundler, I'm getting some errors when I run rails g refinery:cms --fresh-installation or when I try to run any rails or rake command.</p>
  
  <p>Here's my gemfile</p>
  
  <pre><code>source 'https://rubygems.org'
  
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.2.5'
  # Use postgresql as the database for Active Record
  gem 'pg'
  # Use SCSS for stylesheets
  gem 'sass-rails', '~&gt; 5.0'
  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '&gt;= 1.3.0'
  # Use CoffeeScript for .coffee assets and views
  gem 'coffee-rails', '~&gt; 4.1.0'
  # See https://github.com/rails/execjs#readme for more supported      runtimes
  # gem 'therubyracer', platforms: :ruby
  
  # Use jquery as the JavaScript library
  gem 'jquery-rails'
  # Turbolinks makes following links in your web application faster. Read     more: https://github.com/rails/turbolinks
  gem 'turbolinks'
  # Build JSON APIs with ease. Read more:   https://github.com/rails/jbuilder
  gem 'jbuilder', '~&gt; 2.0'
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', '~&gt; 0.4.0', group: :doc
  
  # Use ActiveModel has_secure_password
  # gem 'bcrypt', '~&gt; 3.1.7'
  
  # Use Unicorn as the app server
  # gem 'unicorn'
  
  # Use Capistrano for deployment
  # gem 'capistrano-rails', group: :development
  
  #refinerycms
  gem 'refinerycms'
  
  group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a  debugger console
   gem 'byebug'
  end
  
  group :development do
   # Access an IRB console on exception pages or by using &lt;%= console %&gt; in views
   gem 'web-console', '~&gt; 2.0'
  
   # Spring speeds up development by keeping your application running in   the background. Read more: https://github.com/rails/spring
   gem 'spring'
   end
  
   group :production do
    gem 'rails_12factor'
   end
  
   ruby "2.2.0"
  </code></pre>
  
  <p>and the stack trace</p>
  
  <pre><code>/usr/local/lib/ruby/gems/2.2.0/gems/speakingurl-rails-1.1.5/lib/speakingurl-rails.rb:8:in `block in &lt;class:Railtie&gt;': undefined method `prepend_path' for nil:NilClass (NoMethodError)
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
  from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
  from /Users/Jesmine/workspace/proj/config/environment.rb:5:in `&lt;top (required)&gt;'
  from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
  from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
  from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
  from /usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:142:in `require_application_and_environment!'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:67:in `console'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from /usr/local/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `&lt;top (required)&gt;'
  from bin/rails:4:in `require'
  from bin/rails:4:in `&lt;main&gt;'
  </code></pre>