Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--skip-gems doesn't skip gems placed in development group #17196

Closed
fnando opened this issue Oct 7, 2014 · 4 comments
Closed

--skip-gems doesn't skip gems placed in development group #17196

fnando opened this issue Oct 7, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@fnando
Copy link
Contributor

fnando commented Oct 7, 2014

I tried using the --skip-gems and notice that some gems aren't skipped.

$ rails new foo --skip-test-unit --skip-javascript --skip-bundle --skip-gems jbuilder sdoc byebug web-console spring

Right now, only jbuilder and sdoc are skipped; byebug web-console and spring are still present.

Here's the generated Gemfile:

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0.beta2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.0.beta1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'debugger' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0.0.beta4'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

The expected behavior would be omitting the group entirely, since all gems from that group have been specified. And even spring having its own flag --skip-spring, it should respect the --skip-gems.

Tested version: Rails 4.2.0.beta2

@rafaelfranca
Copy link
Member

In fact I saw this problem when the Gemfile was modified to include groups. I have a patch to fix this problem but I'll need to check with the team if we are going to keep this feature.

@rafaelfranca rafaelfranca added this to the 4.2.0 milestone Oct 7, 2014
@rafaelfranca rafaelfranca self-assigned this Oct 7, 2014
@jrochkind
Copy link
Contributor

I was really looking forward to being able to skip turbolinks, which I think is a popular desire; I hope you don't roll back the entire skip_gems feature, since that is what will allow skipping of turbolinks. (A separate --skip-turbolinks option in another much earlier pull request was rejected because it would be covered by the generic --skip-gems feature).

I think it's probably acceptable if the new --skip-gems feature doesn't work for development gems, at least it works for production gems, and will be very welcome where it does work (better than not existing for any of them!).

@fnando
Copy link
Contributor Author

fnando commented Oct 17, 2014

@jrochkind I don't think Rails should ship a half-baked solution. It must either work for all gems or be removed from next release until it fully works.

@jrochkind
Copy link
Contributor

thank you for adding back --skip-turbolinks with the removal of skip-gems!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants