Ruby on rails bundle install - json error - ruby-on-rails

I have a lot of difficulties to run Ruby on Rails. Maybe you can tell me where I'm wrong ?
I'm on Linux Mint 17.2, with LAMP local server.
To install Ruby :
$ sudo apt-get install ruby
$ ruby -v
ruby 1.9.3p484
$
I didn't have to install gem, it works as shown here :
$ gem help commands
GEM commands are:
build Build a gem from a gemspec
cert Manage RubyGems certificates and signing settings
(...)
update Update the named gems (or all installed gems) in the local
repository
which Find the location of a library file you can require
For help on a particular command, use 'gem help COMMAND'.
Commands may be abbreviated, so long as they are unambiguous.
e.g. 'gem i rake' is short for 'gem install rake'.
Then I installed rails, I dont remember which of those two ways :
$ sudo gem install rails
or
$ sudo apt-get install ruby-railties-4.0
I dont find how to uninstall, so I can't test other ways to install.
Then, I made an application :
$ rails new (path)/second_app
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.js
(...)
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run bundle install
/usr/lib/ruby/1.9.1/rubygems.rb:308:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
from /var/lib/gems/1.9.1/gems/railties-4.0.2/lib/rails/generators/app_base.rb:268:in `bundle_command'
from /var/lib/gems/1.9.1/gems/railties-4.0.2/lib/rails/generators/app_base.rb:277:in `run_bundle'
from (eval):1:in `run_bundle'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /var/lib/gems/1.9.1/gems/railties-4.0.2/lib/rails/commands/application.rb:43:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.9.1/gems/railties-4.0.2/lib/rails/cli.rb:15:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /var/lib/gems/1.9.1/gems/railties-4.0.2/bin/rails:9:in `<top (required)>'
from /usr/local/bin/rails:23:in `load'
from /usr/local/bin/rails:23:in `<main>'
It looks like it was a problem running bundle install. According to tutorials, I run the command
$ bundle install
And I got
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.4.2)
Using i18n (0.7.0)
Using minitest (4.7.5)
…
Using jbuilder (1.5.3)
Using jquery-rails (3.1.3)
Installing json (1.8.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /home/alejandro/.bundler/tmp/9377/gems/json-1.8.3 for inspection.
Results logged to /home/alejandro/.bundler/tmp/9377/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
I tryed to install json in several ways :
$ sudo gem install json -v '1.8.3'
$ sudo apt-get install json -v '1.8.3'
$ sudo gem install json
But it don't work. I tryed to to run de server :
$ rails server
Could not find gem 'rails (= 4.0.2) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
I have tryed to install rvm and rbenv, but nothing works in the way tutorials says it should. My feeling is that I missed something in the begynning, but I dont know what.
Could you please help me ?
Thanks
Alex

You need to update gem lock and all dependency
For that please execute below command,
gem update --system
Now You can install json gem using ,
gem install json
Try above command and let me know if you still face same thing. Above things works fine for me:D

Related

Ruby on Rails - Lynda - Generating a Controller and View, Error on 'Rails Generate' Command

I'm new to Ruby on Rails and was following Lynda's Ruby on Rails essential training guide videos.
In the getting started set of videos, we are shown how the 'rails generator' command works. I have followed all the steps, but every time I type in '$ rails generate' I get the following error:
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
/Users/waleedrahamtullah/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
from /Users/waleedrahamtullah/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/commands.rb:33:in `<module:Spring>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/commands.rb:4:in `<top (required)>'
from /Users/waleedrahamtullah/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/waleedrahamtullah/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/application.rb:77:in `preload'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/application.rb:140:in `serve'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/waleedrahamtullah/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/waleedrahamtullah/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
How do you suppose I get around this?
The answer is in the Error:
You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all`
Update with this:
gem install rubygems-update
Then run:
gem pristine --all
All should be well.
When I update
gem install rubygems-update
and then
gem pristine --all
it didn't work for me.
But answer from How to upgrade rubygems helped to fix issue, but after that for some reason I had to install rails again and install all gems.
Install rubygems-update
gem install rubygems-update
update_rubygems
gem update --system
run this commands as root or use sudo.
I am using ruby with rbenv so I could run those as normal user.
However, generating new rails site
rails new blog
Shows warning about old rubygems.
Warning: You're using Rubygems 2.0.14 with Spring.
Hmm. Checking the environment:
gem env
shows
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14
which is no good. As suggested on the internets I run:
gem install rubygems-update
gem pristine --all
update_rubygems
I am not sure if gem pristine --all was needed, but it can't harm anything. Checking the update status now
gem env
shows
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.6
which is good. Calling
rails new blog
and everything went ok. No warning at all.

Gitlab project - failed to run "rails generate"

Introduction:
I have an installation of gitlab on a local lxc container running ubuntu 13.10 - saucy.
I have installed RVM as a as a multi-user installation - in /usr/local/rvm
In order to run gitlab with RVM I have created a wrapper for the bundle command as specified here
The gitlab application is running correctly but I have a problem running rails generate function
The steps I followed :
$ sudo su git - to login as the git user
$ cd /home/git/gitlab
$ source /etc/profile/
$ rvm use gemset ruby-2.1.1#gitlab - a custom gemset I created
$ gem list - lists all the gems that appear in the Gemfile for gitlab, so I know I am on the right gemset
$ rails -v -> Rails 4.0.3
$ rails generate --help will output
/usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require': cannot load such file -- rb-inotify (LoadError)
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.1.1#global/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/git/gitlab/config/application.rb:6:in `<top (required)>'
from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:43:in `require'
from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/commands.rb:43:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'
What I gathered from this output is that it is in some way trying to use the ruby-2.1.1#global gemset.
If I switch to that gemset $ rvm use gemset ruby-2.1.1#global, $ gem list will output
*** LOCAL GEMS ***
bigdecimal (1.2.4)
bundler (1.5.3)
bundler-unload (1.0.2)
executable-hooks (1.3.1)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.8.1)
minitest (4.7.5)
psych (2.0.3)
rake (10.1.0)
rdoc (4.1.0)
rubygems-bundler (1.4.2)
rvm (1.11.3.9)
test-unit (2.1.1.0)
And if I run bundle install or the wrapper bundle install it says that all the gems are installed.
What am I missing here?
--------------------edit------------------
found a way to make it work
I followed the trouble shooting guide and tried
RAILS_ENV=production bundle exec rails generate --help and it worked
Apparently as stated here in the last comment, rb-inotify is "marked as development dependency" therefore forcing the environment to be production, it won't try to use it
To resolve
'require': cannot load such file -- rb-inotify
You need to install rb-inotify gem. Use the below command to install it:
gem install rb-inotify
Put this line in Gemfile
gem 'rb-inotify'
and give bundle install then
please give gem list in terminal.
if it is there means to fix this problem require this gem in application.rb like,
require "rb-inotify"
this problem will solve.

rails new <app> or rails -h craps out with cannot load such file -- io/console

[ec2-user#ip-XX-XXX-XXX-XXX rails]$ rails -h
/usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- io/console (LoadError)
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/shell/basic.rb:2:in `<top (required)>'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/shell/color.rb:1:in `<top (required)>'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/shell.rb:17:in `shell'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/base.rb:439:in `start'
from /usr/local/share/ruby/gems/2.0/gems/railties-4.1.0/lib/rails/commands/application.rb:17:in `<top (required)>'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/gems/2.0/gems/railties-4.1.0/lib/rails/cli.rb:14:in `<top (required)>'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/gems/2.0/gems/railties-4.1.0/bin/rails:9:in `<top (required)>'
from /usr/local/bin/rails:23:in `load'
from /usr/local/bin/rails:23:in `<main>'
I did install Ruby on Rails using $ gem install rails and it completed fine as well. I had checked the process status with $echo $? and it was 0 meaning successful.
Interestingly these two commands work fine:
$ which rails
/usr/local/bin/rails
$ rails -v
Rails 4.1.0
This is a Amazon Web Services AMI image 64 bit. Please help me figure this out.
I have the bundler installed:
$ gem install bundler
Fetching: bundler-1.6.2.gem (100%)
Successfully installed bundler-1.6.2
Parsing documentation for bundler-1.6.2
Installing ri documentation for bundler-1.6.2
Done installing documentation for bundler after 5 seconds
1 gem installed
I checked for duplicate installs:
$ find / 2>/dev/null| grep bin/ruby
/usr/bin/ruby
/usr/bin/ruby2.0
$ find / 2>/dev/null| grep bin/rails
/usr/local/share/ruby/gems/2.0/gems/railties-4.1.0/bin/rails
/usr/local/share/ruby/gems/2.0/gems/railties-4.1.0/lib/rails/generators/rails/plugin/templates/bin/rails.tt
/usr/local/share/ruby/gems/2.0/gems/railties-4.1.0/lib/rails/generators/rails/app/templates/bin/rails
/usr/local/share/ruby/gems/2.0/gems/rails-4.1.0/guides/code/getting_started/bin/rails
/usr/local/bin/rails
/home/ec2-user/.gem/ruby/2.0/gems/rails-4.1.0/guides/code/getting_started/bin/rails
You would need to install io-console gem. Install it using following command:
gem install io-console
After this run rails -h
Also, run echo $PATH and make sure that you have /usr/local/bin in the path. If not, then you would need to add it.
So I had resolved this the same night, but somehow Stackoverflow didnt send me any notifications on the responses to the question, so I didnt know of these responses. This is what I ended up doing. It was essentially removing the ruby on rails installation and installing it from scratch. This was on a Amazon Web services server - linux flavor.
sudo yum update
$wget https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer
$ bash -s stable < rvm-installer
$ source /home/ec2-user/.rvm/scripts/rvm
$ rvm requirements
$ sudo yum erase ruby
$ rvm install ruby
$ rvm use ruby --default
$ rvm rubygems current
$ gem install rails # this takes forever
After that it worked just fine.
I had exactly the same issue on AWS Elastic Beanstalk (Puma, Ruby 2, Rails 4.0):
> rails generate simple_form:install --bootstrap
/usr/local/share/ruby/gems/2.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- io/console (LoadError)
I simply added:
gem 'io-console'
To the top of my Gemfile and ran bundle install again on the box for great success. Hopefully quicker than reinstalling rails for anyone else who runs in to this.
Thanks; you need io-console indeed. To make that work, install GCC. Rest is needed later on so:
yum -y install gcc mysql-devel ImageMagick-devel
Then,
gem install io-console
works and I could continue installing.

rails cannot load such file -- mysql2/mysql2 (LoadError)

I am newbie to ruby on rails i could not find the solution for this error:
rails s
/usr/local/share/gems/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require': cannot load such file -- mysql2/mysql2 (LoadError)
from /usr/local/share/gems/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `<top (required)>'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /usr/local/share/gems/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/Harish/Documents/simple_cms/config/application.rb:7:in `<top (required)>'
from /usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/share/gems/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
gem uninstall mysql2
gem install mysql2 --platform=ruby
delete the mysql2 gem directory in your rails specific bundle directory and copy paste this newly install mysql2 gem
For Rails 3.2.17 and Ruby 1.9.3-p448 and mysql2 0.3.11, running bundle update mysql2 updated to 0.3.15 and got rid of the error for me.
Ya, It's happening with new version(0.3.13) of mysql2 gem with rails 4.0.0. Deleting the bundle folder under vendor directory, and rerunning bundle install, update fixed this issue for me
cd {Your_RailsApp_Root}/vendor/
rm -rf bundle/
cd {Your_RailsApp_Root}
bundle install
bundle update
Do you have the mysql2 gem installed? Check that your gemfile has gem "mysql2" and then run bundle install from the root of your rails app. Also, ensure that you mysql downloaded in your development environment.
just downgrade the mysql2 version. In my case, I used '0.2.6' version and it worked for me.
gem 'mysql2', '0.2.6'
with ruby version 2.0.0 and gem version 1.8.25
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
from
https://gorails.com/setup/osx/10.14-mojave
I battled this for a day when running into it while trying to run bundle exec rake db:migrate after successfully bundle installing my project gems.
For me, mysql2 was trying to load a configuration file that didn't exist. I had already brew installed mysql on my system, and what mysql2 was looking for existed already in the mysql installation. I ran
gem install mysql2 -v 0.5.3 -- --with-mysql-config=/usr/local/Cellar/mysql#5.6/5.6.42/bin/mysql_config --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
to point mysql2 to the correct configuration.
NOTE the version you have of mysql may be different and the version of the gem you want may also be different.
ALSO NOTE: the gem install path may be different than your bundle install path. You can also the gem to your bundle directory with
gem install --install-dir /path/to/bundle/directory
OR you can set gem options with your bundle build configuration:
bundle config --local build.mysql2 --with-mysql-config="/usr/local/Cellar/mysql#5.6/5.6.42/bin/mysql_config" --with-ldflags=-"L/usr/local/opt/openssl/lib" --with-cppflags=-"I/usr/local/opt/openssl/include"
Apple silicon M1:
gem install mysql2 -v '0.5' -- --with-opt-dir=$(brew --prefix openssl)
It work for me.
gem uninstall mysql2
sudo gem install mysql2
bundle
this solved my error:
[root#localhost cms]# su Harish
[Harish#localhost cms]$ bundle install
[Harish#localhost cms]$ rails s

Rails Bundler gems install

I´m trying to run my Ruby on Rails project on my webserver, I´ve got this message from passenger:
Error message:
Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
this happens when I´m trying install budle in SSH.
passenger#web2:/var/www/clients/client11/web100/web$ bundle install .bundle
/home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:101:in `initialize': Permission denied - /var/www/clients/client11/web100/web/.bundle/config (Errno::EACCES)
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:101:in `open'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:101:in `set_key'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/settings.rb:15:in `[]='
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/cli.rb:211:in `install'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/bin/bundle:19:in `load'
from /home/passenger/.rvm/gems/ruby-1.9.3-p0#global/bin/bundle:19:in `<main>'
or when i try
passenger#web2:/var/www/clients/client11/web100/web$ bundle install
Fetching source index for https://rubygems.org/
Errno::EACCES: Permission denied - /var/www/clients/client11/web100/web/bundler/ruby/1.9.1/cache
An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.
but web is coded in ruby1.9.3
i tried install rake manually as suggested
passenger#web2:/var/www/clients/client11/web100/web$ gem install rake -v '0.9.2.2'
Fetching: rake-0.9.2.2.gem (100%)
Successfully installed rake-0.9.2.2
1 gem installed
Installing ri documentation for rake-0.9.2.2...
Installing RDoc documentation for rake-0.9.2.2...
passenger#web2:/var/www/clients/client11/web100/web$ bundle install Fetching source index for https://rubygems.org/
Errno::EACCES: Permission denied - /var/www/clients/client11/web100/web/bundler/ruby/1.9.1/cache
An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.
It seems you have wrong BUNDLE_PATH value.
Check this article, may be it'll help you: http://blog.ninjahideout.com/posts/the-path-to-better-rvm-and-passenger-integration

Resources