There are rails 4.1 and 3.2.12 installed on our system (windows). When generating rails engine with:
rails plugin new engine --T --mountable --dummy-path=spec/dummy
The engine is generated with Rails 4 by default. Under spec/dummy/config, we notice that it is:
Instead of in rails 3.2.12 engine:
It seems that the Dummy is replaced by Rails in rails 4 engine. Then we changed the gemspec to rails, '~> 3.2.11' and bundle install and replaced Rails.application with Dummy::Application in dummy/config (now it is rails 3.2.12 in gemfile.lock). However there is error when creating sessions under spec/dummy:
The error is undefined 'configure' or undefined 'migration_error=' even after replacing Rails.application with Dummy::Application. Is this a bug?. How to fix this problem? Thanks.
Actually I think that this is not really an issue. You can't simply change the Rails version in your gemspec to get the dummy application working with any version of Rails. I would advise you to add a Gemfile with gem 'rails', '~> 3.2.16' inside in the folder where you would love to store the engine and then run bundle exec rails new engine ....
gem 'rails', '~> 3.2.16'
bundle exec rails new engine ...
I'm giving it a close but if I misunderstood your problem, let me know and I will reopen. Thank you!