I got a RoR project with Gemfile using two different notations in gems declaration in the same file.
gem "browser"
gem 'execjs'
I have also seen tutorials on internet using " " and others using ' ' for declaring gems, but none of them use both in the same file. May it cause any trouble?
If not, there is any difference using " " or ' ' when declaring gems?
The Gemfile is just a Ruby file thats run by Bundler when you run bundle install
and bundle update
.
There is no actual difference between:
gem "browser"
gem 'browser'
Both call the Bundler::Dsl#gem
method with a string literal. Double quoted strings can be interpolated but thats rarely done in in this context.
The choice really boils down to personal preference or whatever the style guide you are following mandates.
Will mixing single and double quotes cause any trouble?
Depends on how much OCD your colleges have.