Restoring Rails 3's Bundle Install Path... It's now install in my root
bundle install <directory name>
makes the bundler install the gems in the respective directory. Running bundle install --system
will set the install directory back to the system directory rather than the custom one you provided.
How can I fix an accidental 'sudo bundle install dir_name'?
After a bit of Googling around i was able to find the answer
Just run:
sudo bundle install --system
and you'll have your gems back at their appropriate system directories.
bundle install returns Could not locate Gemfile
You just need to change directories to your app, THEN run bundle install
:)
Can't fix 'bundle install' failing for gems with native extensions
This might be due to insufficient memory for compiling the native extensions. In my experience, bundle install
is more memory intensive than simply using gem install
. Take a look at /var/log/messages
and see if any such issues are present. Also, use top
to identify any heavyweight processes, like colleagues leaving rails console
running in a screen session. ;)
cannot recover from `sudo bundle install`
Cloning the repo to a new directory would not help. You installed the gems to the standard gems directory instead of a bundle specific directory.
The best option is to install the bundle to a new directory and ignore the gems installed in the system path.
Try bundle install --path /home/akonsu/.new_project_bundle
. You do not have to specify this option every time. It is remembered.
http://bundler.io/v1.3/man/bundle-install.1.html
Also you need to set the permissions of the bundler's cache directory as mentioned in the comments (or delete it).
Bundle install mess
I'm assuming that you first tried something like bundle install newrelic_rpm
, which created the newrelic_rpm
folder and told Bundler to start using that folder as the default.
Your .bundle/config
file likely contains something like this:
---
BUNDLE_PATH: newreli_rpm
BUNDLE_DISABLE_SHARED_GEMS: "1"
The easiest way to fix this (assuming your Bundler is up to date), is to run this command to install everything back in the main shared system paths:
bundle install --system
Then, bundle update newrelic_rpm
should do what you intended (updating the newrelic_rpm
gem, rather than updating everything and putting it in newrelic_rpm
).
Running bundle install fails and asks me to run bundle install
OK guess I fixed it..
For the gems that running bundle install
complained about when run from inside the app directory, I installed them by going outside the app directory and doing sudo gem install [gem]
one by one. Doing bundle install --gemfile=myApp/Gemfile
also installed a couple of the missing gems.
I have no idea why I wasn't able to just run bundle install
from inside the app directory...lame.
Installing Gems with Bundler == Big problem
That is because you also have to address where the gem location ( specifically where bundler is installed ) in your nginx start script as well.
bin/start
#!/bin/bash
TMPDIR=/home/shadyfront/webapps/truejersey/tmp GEM_HOME=/home/shadyfront/.rvm/gems/ruby-1.8.7-p330@true /home/shadyfront/webapps/truejersey/nginx/sbin/nginx -p /home/shadyfront/webapps/truejersey/nginx/
Related Topics
How to Submit Polymorphic Comments on Feed? [Error]
How to Programmatically Generate Heroku-Like Subdomain Names
Rails: Good Rspec2 Example Usage? (Also: Cucumber, Pickle, Capybara)
Hash['Key'] to Hash.Key in Ruby
How to Dump an Http Request from Within Sinatra
Rails If Object.Nil? Then Magic '' in Views
Rails Fields_For Form Not Showing Up, Nested Form
Error Installing Homebrew - Brew Command Not Found
Ruby Shoes Gui: Continually Updating Paragraphs
What Is the &: of &:Afunction Doing
How to Set Up a Sinatra App Under Apache with Passenger
What's the Difference Between Request.Remote_Ip and Request.Ip in Rails
If Java People Go to Scala, C# Go to F#, Where Do Ruby People Go for Functional Nirvana
Why 'Self' Method of Module Cannot Become a Singleton Method of Class