What is ":require=>false:" in Gemfile?

Asked 2 years ago, Updated 2 years ago, 38 views

gem 'whenever', :require => false

Does this mean that a gem should be installed? Or do you mean you won't require it?

ruby ruby-on-rails gem

2022-09-22 08:04

1 Answers

It means that you will install the gem, but you will not require it when you start the Bundler.

If you're going to use a library,

require "whenever"

in writing.

To download a gem named whenever but require whereever

gem "whenever", :require=>"whereever"

I'm writing. If the name of the gem and the name of the libraay to require are different, write it like this


2022-09-22 08:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.