Use bundle exec rake or just rake?

后端 未结 3 2101
遥遥无期
遥遥无期 2020-12-02 08:23

I learned Rails using just the rake command like rake db:migrate; however, I read that I should be using the bundle exec rake ... instead of just p

3条回答
  •  旧时难觅i
    2020-12-02 08:53

    running any exacutable without bundle exec will have Rubygems fetching the latest version of the gem installed in your system.

    By adding the bundle exec prefix instead will have the executable running in the context of your Gemfile.lock, which means that will be run using the version defined in the gem file.

提交回复
热议问题