-
Notifications
You must be signed in to change notification settings - Fork 0
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
upgrading to rails 6 #513
upgrading to rails 6 #513
Conversation
* Specify rails ~> 6.0.0 to force rails 6.0.x * remove coffee-rails entirely; would need a different version to work with Rails 6, but Rails 6 apps don't by default include it in Gemfile, and I don't believe we are using it at all. * Temporarily point to a `qa` (aka "questioning_authority") branch directly on github, that allows Rails 6, as qa master/release does not yet. Hope to change this before we merge this branch here. * rspec-rails requires 4.0 beta to work with Rails 6. We than ran `bundle update` to update ALL dependencies to latest within requirements tree; many various dependencies needed to be updated for Rails 6 even if their gemspecs didn't say so, and this is just a good time to update all our dependencies.
Apparently even when not required cause original was pure ascii anyway?
In Rails6 too. Not totally sure what's going on here.
Rails6 seems to have broken our attempts under testing to use different ActiveJob queue adapters for different tests. Very confused about what's going on, not sure if it's broken that for everyone, everyone using rspec, just us, or what. Haven't yet figured out how to fix it. |
Rails 6.0.1 new apps generate with puma ~> 4.1, so we used the same.
Spending some time with https://guides.rubyonrails.org/upgrading_ruby_on_rails.html to potentially manually upgrade certain other in-app things. |
Alas, still doesn't include the fix we need in rspec-rails, next release I guess.
$ bundle update rails
One test is failing because of a bug in rspec-rails. A fix has been merged into rspec-rails master, but is not yet released. rspec/rspec-rails#2242 I would like to give it a few weeks to see if we get an rspec-rails release; the only other option we know of for moving forward is making a temporary local fork of rspec-rails and depending on that instead of an official rspec-rails release. That is possible, but would be kind of unfortunate and require us to remember to switch back to real rspec-rails in the future. (Trying to depend on rspec-rails git master instead of a release -- while ordinarily an option with git-hosted rubygems, doesn't work with rspec-rails for idiosyncratic reasons). update rspec-rails 4.0 final finally came out, resolving |
Oops, need to do a bit of cleanup with regard to new zeitwerk autoloader too, especially wrt STI. https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#require-dependency May want to put some of that in kithe, or not. update: put it in kithe, required a yell workaround too sciencehistory/kithe#79 Generally go over zeitwerk-related upgrade notes, and run the zeitwerk check script. |
with $ bundle update
everything
Includes upgrade to kithe including handling this for us. sciencehistory/kithe#79
After deploy of rails6, people will probably have to log in again -- rails 5 cookies will end up invalidated due to new security measures in Rails6. |
Ref #299
Changes...
Gemfile.lock of course changes to update a lot of dependencies. And Gemfile to ask for Rails6, and related dependency updates.
Most file changes are just updating some 'standard' config files to have the config or logic that would have been generated with Rails6, to stay up to date.
Additionally, some
response.content_type
changed toresponse.media_type
for Rails 6. https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#actiondispatch-response-content-type-now-returned-content-type-header-as-it-isMany dependencies updated
As of this moment,
bundle update
can be run regularly to update all dependencies to the latest allowed by dependency tree restrictions, getting any new versions with bugfixes, security fixes, etc. The Gemfile is such thatbundle update
will not update anything known to break. And this PR includes regularbundle updates
so when merged we'll be getting latest versions of lots of dependencies.Some dependencies not updated
Originally I had hoped to upgrade some other dependencies in this PR too, just get all our dependencies really spiffy, with a really tiny output in
bundle outdated
.However, browse-everything is still limiting us to some old dependencies --
bundle update
won't get to latest version of some dependencies because browse-everything's gemspec restricts it.An upcoming release of browse-everything might fix this, but at the moment we can't upgrade browse-everything because it refuses to let us use sprockets 4. This may be resolved subsequently samvera/browse-everything#310 samvera/browse-everything#345