This is a very odd one and I’m not sure how to proceed.
Basically, I am able to install gems and use them normally within any folder except those created with rails. It’s very very odd. It’s difficult to explain so maybe this console output will explain
passenger@rubyserve:~/railsapps$ ls
app test_application testing
passenger@rubyserve:~/railsapps$ rails -v
Rails 3.2.2
passenger@rubyserve:~/railsapps$
passenger@rubyserve:~/railsapps$
passenger@rubyserve:~/railsapps$ cd app/
passenger@rubyserve:~/railsapps/app$ ls -a
. app config.ru doc Gemfile.lock lib public README.rdoc test vendor
.. config db Gemfile .gitignore log Rakefile script tmp
passenger@rubyserve:~/railsapps/app$
passenger@rubyserve:~/railsapps/app$
passenger@rubyserve:~/railsapps/app$ rails -v
The program 'rails' is currently not installed. To run 'rails' please ask your administrator to install the package 'rails'
passenger@rubyserve:~/railsapps/app$
It makes bugger all sense. When outside my rails folder, I can call rails to make a new application but once within, rails isn’t detected. This is the same for all gems including bundler.
My first thought was that somehow, rails had some specific gem folder hidden away, so I done my gem install from within the rails project, however this didn’t work either.
Any thoughts?
My setup is ubuntu server 10.10 (I know, i know)
Ruby 1.9.2
gem 1.8.17
and I’m using the latest rvm from wayneeseguin.enter code here
This type of problem some time occurs i think u can save a lot of time by installing and using RVM
After installing RVM create gemset directory every time whenever you create separate project. e.g you create application blog first you create gemset directory with giving this command
then you should use this gemset directory and also ruby version as well e.g you have install ruby 1.9.2 then use this command
after that go into directory of blog application and install this gem
and also then
bundle install. so all local gem will be installed into this blog directory under rvm and there will be no conflicts will be appear.But keep one thing in mind if your platform is ubuntu then this will work