avdgaag / stationed

Rails application generator and scaffold templates
http://avdgaag.github.io/stationed
MIT License
11 stars 3 forks source link

Application generator adding capybara to Gemfile twice #3

Open mjsprojects opened 7 years ago

mjsprojects commented 7 years ago

when I execute stationed to generate a new project the Gemfile it generates has capybara listed twice which is causing bundler to fail.

The first time capybara is listed is in the first group :development, :test block

group :development, :test do

Call 'byebug' anywhere in the code to stop execution and get a debugger console

gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]

Adds support for Capybara system testing and selenium driver

gem 'capybara', '~> 2.13.0' gem 'selenium-webdriver' end

It is then listed near the end of the file like this:

gem 'capybara', group: :test

I haven't dug through the code yet to find where these are getting inserted from, that's next on my todo list :)

running ruby 2.4.0 via rbenv on Ubuntu 16.04 if that helps to reproduce. The version of stationed that was installed with "gem install stationed" was 0.6.0.

avdgaag commented 7 years ago

I think although this project technically works with Rails 5, it’s not really updated since early 4.x versions. Rails 5 already includes Capybara by default, so Stationed is inserting a duplicate. You can prevent this from happening by using the --no-capybara option, but there might be other incompatibilities or conflicting settings.

I’ll gladly take pull requests to update this project, but I don’t really use it myself.