Comments (6)
Any reason why we are trying to add the Ruby version on the Gemfile? Right now, the only tool that actually doesn't know how to read .ruby-version
is Heroku, and I'm pretty sure we can teach Heroku to read it.
from rails.
I had to revert the change because it blocks devcontainers. See 707b5cb.
I'll reapply it when we have our own devcontainer ruby images.
from rails.
The original addition was here:
I don't recall whether there is now, or was historically, a difference in how Bundler will resolve a gemfile given the presence/absense of a ruby
directive -- beyond the obvious hard-stop if the running version doesn't match.
In that original PR, @deivid-rodriguez recommended ruby RUBY_VERSION
instead of duplicating the value; that still strikes me as a bit of a warty [and tautological] spelling, even compared to the new file:
syntax... but it does leave me wondering what we lose by just omitting the line entirely.
from rails.
Spellings aside, the fact the file:
syntax locks us so rigidly to a precise version (per 707b5cb) is IMO, Quite Unfortunate.
from rails.
We can also do ruby "~> 3.2.0"
if we need to specify a version to match more what you expect this check do to. It is still duplicating the value, but at least it will not hard fail anymore.
So far, I don't know what we lose by omitting the ruby
line. If all tooling is already reading from .ruby-version
, that alone should keep consistent resolution for bundler.
from rails.
I think ruby
DSL just adds an extra dependency on the language version for your app. I think people will typically use it when directly depending on Ruby features particular to some Ruby versions. Transitive dependencies may or may not add a dependency on the language version. By using the Ruby DSL, you make what the application supports explicit. As mentioned, ruby
can take a relaxed or exact requirement, making the application more or less picky when run on different rubies.
I think it's up to each user/use case what to use. Maybe for freshly generated Rails apps it's indeed best to be as flexible as possible by avoiding the ruby
line altogether.
from rails.
Related Issues (20)
- add a better interface to the issues tab on this repo HOT 1
- Unnecessary auto save is triggered for polymorphic has_one defined in child class using single-table inheritance HOT 5
- ActiveStorage ProxyController sets Cache-Control headers on errors like FileNotFoundError HOT 3
- Using preload with composite keys can cause too many records to be read HOT 3
- Empty multipart form data raises ActionController::BadRequest error since Rails 7.0.5 HOT 9
- Incompatible with nio4r 2.5.8 gem when running Bundle Install (Rails version 7.0.5.1) HOT 2
- Can't use Model.exists? with composite primary keys HOT 1
- Missing Active Record encryption credential when using ActiveRecord::Encryption.without_encryption HOT 1
- Forked child processes created through rails runner throw error from ActiveRecord when exiting HOT 3
- Add .default method to ActiveSupport::ParameterFilter (syntax sugar) HOT 2
- RedisCacheStore not fault tolerant (as I expected) HOT 3
- Doc have typo? HOT 3
- `ActiveRecord::Migration::check_all_pending!` resets connection pool when in use in other threads HOT 2
- migrate `migrate` folder to `migrations` HOT 3
- Using a secret_key_base from `secrets.yml` should raise a deprecation warning in development HOT 1
- Autoloaded classes raise NameError when accessed in parent's on_load hook during load
- Active Storage bug HOT 3
- [Question]`mark_for_destruction` not destroying records when loading using `find_by` HOT 2
- .eager_load when selecting another column sets the ID incorrectly to a record being eager loaded. HOT 1
- Javascript not setup with new rails app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.