If you had that version of gemcutter installed even if you also had a newer version without this problem , Rubygems would activate gemcutter 0. Consider using bundle exec. In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin. Running the command by itself seems to work most of the time so what is different? We know that rake db:migrate for example is the command we want to run.
We know that bundle install is how you install all of the contents of a Gemfile which should install all the correct versions from the Gemfile. When you run rake db:migrate you are running commands on gems.
Specifically you are running the commands on the versions of gems that are installed on your operating system now. Any subshells created inside the block will be given the environment present before Bundler was activated. For example, Homebrew commands run Ruby, but don't work inside a bundle:.
Bundler provides convenience helpers that wrap system and exec , and they can be used like this:. This includes executables installed into the system, like rails , rackup , and rspec. Since Rubygems plugins can contain arbitrary Ruby code, they commonly end up activating themselves or their dependencies.
For instance, the gemcutter 0. What does bundle exec rake mean? Ask Question. Asked 10 years, 4 months ago. Active 1 year, 11 months ago. Viewed k times. Improve this question. Andrew Marshall JnBrymn JnBrymn Add a comment. Active Oldest Votes. Improve this answer. Onato 9, 5 5 gold badges 44 44 silver badges 53 53 bronze badges. Does that mean we should always run bundle exec, I have used ruby version manager to install ruby and ruby on rails.
Edmund A "bundle" is an english word, meaning a group of similar things, usually tied up neatly. Specifically in this question, it refers to a group of Gems self-contained ruby code libraries. Bundler is the name of the software which we are using here to manage Gems. And bundle is the command which is used by Bundler. I have impression that whenever we cd to a folder with Gemfile, the shell will automatically use the versions specified in Gemfile e.
Ruby version. Based on that assumption, I thought rake db:migrate would always run fine without bundle exec. PahleviFikriAuliya that is only true if you have a. There is also a. And they could have also chosen the shorter version to be the one that is used more frequently the local one instead. Show 5 more comments. Jake Worth 4, 1 1 gold badge 21 21 silver badges 28 28 bronze badges.
0コメント