Skip to content

Conversation

@claudiob
Copy link
Member

The "-j" option was added 5 years ago (d9c39c3a)
when we wanted to support prototype-rails and jquery-rails.
Prototype is not as popular and jQuery is not a requirement anymore.
Still the "-j" option can be used to install any gem that ends in "-rails".

This "might" open security issues and does not bring great benefits anymore.

If you know which "-rails"-ending gem you want to install, you can manually
add it to the Gemfile just like any other gem.

The "-j" option was added 5 years ago (rails@d9c39c3a)
when we wanted to support prototype-rails and jquery-rails.
Prototype is not as popular and jQuery is not a requirement anymore.
Still the "-j" option can be used to install *any* gem that ends in "-rails".

This "might" open security issues and does not bring great benefits anymore.

If you know which "-rails"-ending gem you want to install, you can manually
add it to the Gemfile just like any other gem.
@claudiob claudiob added this to the 5.2.0 milestone Mar 23, 2017
@claudiob
Copy link
Member Author

My opinion is that we don't need a full deprecation warning cycle for this change, since it only affects generating new apps, not existing apps. Let me know if that's not the case.

I looked for -j and --javascript elsewhere in the code and in the guides and did not find any other reference… let me know if I forgot anything!

@kaspth
Copy link
Contributor

kaspth commented Mar 23, 2017

It's possible for people to have an app template that includes the option. Perhaps a .railsrc too.

Perhaps it's best to deprecate.

@sunnyrjuneja
Copy link

I think this makes a lot of sense. It would also alleviate the confusion in my issue created here: #28512

@rafaelfranca
Copy link
Member

If they have in the .railsrc it will just be ignored.

@rafaelfranca rafaelfranca modified the milestones: 5.1.0, 5.2.0 Mar 27, 2017
@rafaelfranca
Copy link
Member

I'll include this in 5.1 since we already include rails-ujs.

rafaelfranca added a commit that referenced this pull request Mar 27, 2017
Remove -j (--javascript) option from `rails new`
@rafaelfranca rafaelfranca merged commit 4219806 into rails:master Mar 27, 2017
@rafaelfranca
Copy link
Member

Backported in 0b0255d

rafaelfranca added a commit that referenced this pull request Mar 27, 2017
Remove -j (--javascript) option from `rails new`
@claudiob claudiob deleted the drop-j-option branch March 28, 2017 17:58
y-yagi added a commit to y-yagi/rails that referenced this pull request Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants