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

Remove -j (--javascript) option from rails new #28546

Merged
merged 1 commit into from Mar 27, 2017

Conversation

@claudiob
Copy link
Member

@claudiob claudiob commented Mar 23, 2017

The "-j" option was added 5 years ago (d9c39c3)
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@d9c39c3)
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

@claudiob claudiob commented Mar 23, 2017

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
Member

@kaspth 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

@sunnyrjuneja sunnyrjuneja commented Mar 27, 2017

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

@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Mar 27, 2017

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

@rafaelfranca rafaelfranca added this to the 5.1.0 milestone Mar 27, 2017
@rafaelfranca rafaelfranca removed this from the 5.2.0 milestone Mar 27, 2017
@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca commented Mar 27, 2017

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

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

@rafaelfranca rafaelfranca commented Mar 27, 2017

Backported in 0b0255d

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

Successfully merging this pull request may close these issues.

None yet

5 participants