-
Notifications
You must be signed in to change notification settings - Fork 25
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
Upgrade to Rails 7 #307
Upgrade to Rails 7 #307
Conversation
f4d7a73
to
f8064a6
Compare
dae7b3b
to
7562210
Compare
@@ -8,3 +8,5 @@ | |||
apply 'config/environments/development.rb' | |||
apply 'config/environments/production.rb' | |||
apply 'config/environments/test.rb' | |||
|
|||
copy_file 'config/initializers/backtrace_silencers.rb' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗒️ This initializer has been removed from the base application. so now I updated to copy file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why add it back? Do we make use of it in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'm not sure about that. Seems we're modifying this file to make it work with engine structure. This change is from this issue - #147
Maybe we can remove it first and keep our eyes on the error. If we still have the issue, we can add it back again. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it might be hard to reproduce the issue (unless we try creating an engine 😅 ), let's keep it. It is likely that part of Rails did not change much in that version and there this is likely still needed.
That's a very interesting piece of an update! Thanks! I was able to run it locally and display the sample page. ✅ Though I go a few errors on the way, I'm not sure if this was already like this in the template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update seems very complete so just a few minor questions and concerns
gem 'sidekiq' # background processing for Ruby | ||
gem 'bootsnap', require: false # Reduces boot times through caching; required in config/boot.rb | ||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] # Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||
# gem 'jbuilder' # Build JSON APIs with ease |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we rarely (or never) use jbuilder
, how about removing it entirely?
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] # Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||
# gem 'jbuilder' # Build JSON APIs with ease | ||
# gem 'redis' # Use Redis adapter to run Action Cable in production | ||
# gem 'kredis' # Use Kredis to get higher-level data types in Redis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that added by default? It feels a bit strange to have commented out dependencies 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I brought this from the project that is generated from default rails template 🙌
I put comment because I'm not sure if we will use it or not (Same for jbuilder
)
By putting comment on them, My idea is to help us to not forget to checkout those gems later if we want to include it or not. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood that it comes by default so it can be kept commented as done here
"bootstrap.native": "3.0.13", | ||
JSON | ||
end | ||
run 'yarn add bootstrap@^4.5.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Bootstrap 5 should be used instead? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed Long, I'll create an issue for that. 👍
JSON | ||
end | ||
run 'yarn add bootstrap@^4.5.2' | ||
run 'yarn add bootstrap.native@^3.0.13' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by using Boostrap 5 which doesn't use jQuery, bootstrap native is no longer needed.
Thank you for trying it out @malparty 🎊 👨💻 👩💻 🎊 For the warning
I've also seen the parser warning too, I tried to search for the solution but it seems safe. Let me recheck it when working on upgrading Ruby to version 3. Hope that it will get rid of that warning 👍 For the error that is blocking you from generating the project. I've never faced it. But I guess it is from the spring version 🤔 not sure why I have For this, I will need your help to generate the project again. I'll try removing the For the In one of the step in template, we can see it is running I'm not sure if the problem is from when generating the project from the template, it might not run successfully. 🤔 I think I need your help to try again to see if the and for the reason the 🕵️ I'm dropping the command to test again here so anyone could try: 🕵️
|
ℹ️ These are my sprint versions: ✅ I've run the command a new time: it seems better as this time it ran until the end 👍
✅ DB migration: Yes, you are right, no schema to be deployed at the moment! This is not an issue then :) So overall, my issue is now fixed!! Thanks! 🚀 |
8613fd1
to
18ea757
Compare
What happened
7.0.1
There are new way to manage the JS and CSS asset. But I decided to do that later. Right now, in this PR, We will stick with
Webpacker
gem as before.Insight
To upgrade our template to support Rails 7
The new Hotwire integrations, turbo and stimulus, are also off by default following our old template.
📝 Note
For the next steps, we will need to:
2.7.2
to3.x
Proof Of Work