'bundle install' is creating ./rails folder - ruby-on-rails-3

I'm running a Rails 3.0.3 app using RVM (Ruby 1.8.7). When I run bundle install all the gems install and then I get this message Your bundle is complete! It was installed into ./rails. But the app isn't recognizing/see those gems. Not sure what I've done wrong that it's doing this. Let me know if you need any other information.

I bet you accidentally ran bundle install rails at one point, which configured your bundler to install your gems into the ./rails directory.
To reset that, remove the ./.bundle directory (or remove the BUNDLE_PATH line from ./.bundle/config). Then bundle install will put them in the right spot.

Related

git://github.com/ryanb/nested_form.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)

I have deployed my application on linux server with passenger and apache, I have done bundle install run successfully still i get
( git://github.com/ryanb/nested_form.git (at master) is not checked out. Please run bundle install (Bundler::GitError) ) error while i try to run my application
FYI, i am using rails 3.2.3 and ruby 1.9.3
This works fine on my development machine
Any Idea ?
I have currently solved the issue by running below
bundle pack
bundle install --path vendor/cache
This solves my problem, but it stores whole gems in the vendor directory
But still if anybody have better solution then please let me know
I had the same problem, I always installed my gems as system-wide gems (including the ones from github).
$ sudo bundle install
When I ran rails, I got the same error:
$ rails s
http://github.com/Sija/garb.git (at master) is not checked out. Please run `bundle install`
So when I ran:
$ bundle install
This installed the gems from github locally, but otherwise used all the other system-wide gems.
Then when I ran rails again, it worked.
Are you running bundle install as root? If yes, try running bundle install without "sudo", anyway this seems to be a permissions problem (as Google suggests [google => (at master) is not checked out. Please run bundle install (Bundler::GitError)])1

Omniauth + Devise Error: Could not find hashie-1.2.0

I add this to Gemfile:
gem 'omniauth-facebook'
Then I run bundle update. No problem so far. But when I run rails server I get this error:
Could not find hashie-1.2.0 in any of the sources
Run `bundle install` to install missing gems.
I thought that bundler was supposed to resolve and satisfy all dependencies, but I tried this anyway:
gem install hashie-1.2.0
Which gave this:
ERROR: Could not find a valid gem 'hashie-1.2.0' (>= 0) in any repository
ERROR: Possible alternatives: hashie-model
I'm new to Rails and I feel I'm at a dead end. Suggestions?
UPDATE: I also have run bundle install (to be exact bundle install --without production) several times. I get the same error when running rails server after that.
UPDATE: I aslo tried adding gem 'hashee' in the Gemfile before omniauth-facebook. No luck.
So I think you are just using bunder incorrectly.
bundle update doesn't resolve new dependencies, it simply looks at the gem manifest, which is stored in Gemfile.lock and updates those gems to the most recent gem allow by the constraints placed on them in the Gemfile.
Since you are trying to install a new gem, what you what to run is bundle install which will make a comparison between your Gemfile and your Gemfile.lock and install any gems that are not listed in your Gemfile.lock.
I think bundle install should do the trick for you.
As a side note, bundler tries to make this as easy as possible for you by aliasing bundle to bundle install. So, unless you are explicitly looking to update your gems, you can just type bundle and get the behavior that you are expecting.
I got it working. I think it was some problem with bundler. I did some different things, and I have to admit that I'm not 100% sure what fixed it. I think what did it was this:
gem uninstall bundler
gem install bundler
bundle install mail
However, it did not work until my second reinstall I think. Upon the install command, it installed everything, not just mail and its dependencies. The only other thing I did was to delete /usr/bin/bundler after the first reinstall. It did not reappear.

Bundle install keeps installing to ./runner

Not sure what's going on here, but in my Rails 3 application, I type bundle install and at the end if says Your bundle is complete! It was installed into ./runner.
Weird because I have no idea where runner is coming from!
If I recall correctly, if you run something like bundle install ./runner it will remember the path ./runner. bundle install --system should fix it. i think.
See the manpage:
--path=<path>
The location to install the gems in the bundle to.
This defaults to the gem home, which is the location
that gem install installs gems to. This means that, by
default, gems installed without a --path setting will
show up in gem list. This setting is a remembered option.
--system
Installs the gems in the bundle to the system location.
This overrides any previous remembered use of --path.

Getting Rails working with a JS runtime environment

I'm using Ubuntu 11.10 and the terminal to install and run Rails. Here
is the process I've taken so far to setup Rails:
download and install Ruby 1.9.2 and Rails 3.1.0
-- I did this using sudo apt-get ruby1.9.1 and sudo gem install
rails
I made a new rails app using rails new path/to/app
I went to the new app directory and tried running rails server and got an
error about not having a JS ruby environment
I had to get a JS runtime environment for execjs so I downloaded 'therubyracer'
as well as 'therubyrhino' and added them to my gem file, one at a time like this:
gem
'therubyracer' then ran bundle install
After everything was successful with the install, I ran rails server again
-- with both runtime environments I have had similar errors:
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.
Could not find therubyrhino-1.73.0 in any of the sources
Run `bundle install` to install missing gems.
Bundle knows where these programs live, giving correct pathnames when I
enter bundle show libv8 or bundle show therubyrhino. They are both
in /usr/lib/ruby/gems/1.9.1/gems/_ where all the other gems are
located for the bundle install.
Does anyone know where this exception is coming up in the Rails source
code? Does anyone know how Rails is gathering the gems? Better yet,
anyone had this problem and know how to fix it?
Thanks so much,
Feav
Have you tried starting the server using bundle exec rails server?
This problem has been fixed in a newer version of Rails.

Using RVM, Rails 3.0.7 is messed up after installing Rails 3.1.0 beta1

Using rvm I installed and am using Ruby 1.9.2p180.
I created a gemset called rails3tutorial and, using it, installed Rails 3.0.7, created "sample_app", then used bundle to install. Very nice.
Then I created a new gemset called rails310b1, installed Rails 3.1.0 Beta 1, created an app, and bundle install'd...but it turned out I was not actually switched to the rails310b1 gemset, and so I ended up installing to ruby-1.9.2p180's default gemset (is that #global?...). I then manually deleted all the gems that had been installed!
Then I switched to rails310b1, and bundle install'd, created an app, fired up the app -- golden.
Now I switch back to the rails3tutorial gemset, and cd to the app created using it, and I get errors when running rails commands like...
$ rails generate integration_test layout_links
/Users/paul/.rvm/gems/ruby-1.9.2-p180#rails3tutorial/bin/rails:19:in `load': no such file to load -- /Users/paul/.rvm/gems/ruby-1.9.2-p180#rails3tutorial/gems/rails-3.1.0.beta1/bin/rails (LoadError)
from /Users/paul/.rvm/gems/ruby-1.9.2-p180#rails3tutorial/bin/rails:19:in `<main>'
It's looking for /Users/paul/.rvm/gems/ruby-1.9.2-p180#rails3tutorial/gems/rails-3.1.0.beta1/bin/rails but why?! $PATH looks fine.
Any suggestions as to what is messed up and how to clean this up, or is it best if I wipe out all my gems/gemsets and start over?...
Thanks!
There is nice screencast with basics of RVM http://screencasts.org/episodes/how-to-use-rvm but it mostly comes to using rubies:
rvm install 1.9.3
cd ~/projects/my-app
touch Gemfile
rvm use --create --rvmrc 1.9.3#rails32
gem install bundler rails
bundle exec rails new .
bundle install
bundle exec rails generate integration_test layout_links
please note you need to prefix most of the commands with bundle exec there is my gem that should save you from this problem rubygems-bundler.
also make sure you use .rvmrc files for every project so when you switch dir in console the proper ruby environment is set, the --rvmrc switch used above will generate one for you.