Rails 3: Passenger can't find git gems || gem is not checkout Please run bundle install
2012-03-16 16:26
561 查看
ails 3.0.0, Passenger 2.2.15:
Create a new Rails project
Add
Do
Everything OK, starting with
However, when accessing with Passenger, it says:
git://github.com/lmumar/paperclip.git (at rails3) is not checked out. Please run
I have tried
~/.bundler is owned by the same user as the Rails project (Passenger runs under this user), so it can't be a permission problem. sudo is installed and called by
--------------------------------------------
Im used to have this problem, resolve using
Which will install the gems in vendor/bundle
or
Mare sure that
Note BUNDLE_PATH, not BUNDLER_PATH! There was also an DISABLED_SHARED_GEMS=1 entry, I removed it.
Then bundler recognises the correct path even when loaded from Passenger. Without Passenger, it always worked (and used /home/xxxxx/.bundler, as said in the question)
Create a new Rails project
Add
gem 'paperclip', :git => 'git://github.com/lmumar/paperclip.git', :branch => 'rails3'to your Gemfile
Do
bundle install
Everything OK, starting with
rails/script server& accessing also works
However, when accessing with Passenger, it says:
git://github.com/lmumar/paperclip.git (at rails3) is not checked out. Please run
bundle install(Bundler::GitError)
I have tried
bundler pack(doesn't help) and setting BUNDER_HOME to ~/.bundler (the Paperclip git gets installed there by
bundler install) in the .htaccess and various places in config/*.rb, but this wasn't successful, too.
~/.bundler is owned by the same user as the Rails project (Passenger runs under this user), so it can't be a permission problem. sudo is installed and called by
bundle install.
--------------------------------------------
Im used to have this problem, resolve using
bundle --deployment
Which will install the gems in vendor/bundle
or bundle install --path vendor/bundleto install the gems locally, instead of into system gems.
or
Mare sure that
RAILS_ROOT/.bundle/config(SetEnv etc. didn't work for me) contains:
--- BUNDLE_PATH: /home/xxxxx/.bundler
Note BUNDLE_PATH, not BUNDLER_PATH! There was also an DISABLED_SHARED_GEMS=1 entry, I removed it.
Then bundler recognises the correct path even when loaded from Passenger. Without Passenger, it always worked (and used /home/xxxxx/.bundler, as said in the question)
相关文章推荐
- The program 'unzip' is currently not installed. You can install it by typing:
- rails server Could not find gem 'sqlite3-ruby (>= 0)'
- $(srctree) is not clean, please run 'make mrproper'
- Could not find a valid gem 'rails' (>= 0), here is why
- Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again.
- 装qt的时候出现QT version is not properly installed, please run make install qmake使用不了问题
- Can't find API database; API check was not performed
- 升级Rails3.0后出现这样的问题。Could not find gem 'mysql2 ....
- Rails 4 - Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded
- R-2.15.1 在 fedora16 上的安装(Can't find X11 headers and libs)
- About Derby "ERROR 42X51: The class '***' does not exist or is inaccessible. This can hap pen if the class is not public."
- An SDK corresponding to WDK version '8.1' was not found. Please install the SDK before building.
- android 开发时出现 Please ensure that adb is correctly located at '...\adb.exe' and can be executed
- “Unable to start debugging. The Silverlight Developer Runtime is not installed. Please install a matching version.” 解决办法
- Could not find a storyboard named 'Main' in bundle NSBundle
- Drozer提示找不到java路径:Could not find java. Please ensure that it is installed and on your path
- Could not find gem 'sass-rails (~> 5.0) x64-mingw32' in any of the gem sources listed in your Gemfil
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 87: ordinal not in range(128)
- Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
- CodeBloks(解决路径问题)Can't find compiler...