Rails 6.1, Ruby 3.0.0: tests error as they cannot load rexml
rexml
gem is a bundled gem since Ruby 3.0.0.
So you must add rexml
to Gemfile
.
On Ruby 2.6 and 2.7, rexml
gem is default gem.
So default rexml
is used if Gemfile
does not include rexml
.
On these versions of ruby, you must add rexml
to Gemfile
only if you want to use specific rexml
version.
Rails: How can I regenerate all the views created by scaffold after I make changes to the underlying table?
You could reverse the scaffold generation and regenerate a new scaffold with renamed and new columns.
If you already migrated the database you will need to roll it back.
rake db:rollback
Then you can reverse the scaffold generation.
rails destroy scaffold MyFoo
Then generate new scaffold with updated columns
rails generate scaffold MyFoo column_name_1:data_type column_name_2:data_type column_name_3:data_type
Otherwise you can manually rewrite your views and controllers to include the updated and new columns.
Related Topics
Count Number of Days Between Two Dates
How to Call an Older Version of a Gem from the Commandline
Iconv Deprecation Warning with Ruby 1.9.3
Attr_Accessor Strongly Typed Ruby on Rails
What Is the %W "Thing" in Ruby
Is It a Bad Practice to List Ruby Version in Both Gemfile and .Ruby-Version Dotfile
Redis or Mongo for Determining If a Number Falls Within Ranges
Rails How to Update a Column After Saving
Rspec: How to Test If a Method Was Called
How to Measure the Size of a Ruby Object
How to Display a PDF in Ror (Ruby)
Handling Namespace Models (Classes) in Namespace
Rails Migration Changing Column to Use Postgres Arrays
Rails 3:How to Generate Models for Existing Database Tables
Failed to Build Gem Native Extension
How to Get Attributes That Were Defined Through Attr_Reader or Attr_Accessor