Rails3 MiniMagick load error on choose_processor - ruby-on-rails-3

A rails 3.2.13 application is running both on localhost and on server (in development mode). In localhost the application loads an image via carrierwave and MiniMagick properly.
On the server, an error is raised
undefined method `size' for nil:NilClass
, with the full stack leading of as such:
mini_magick (3.7.0) lib/mini_magick.rb:24:in `choose_processor'
mini_magick (3.7.0) lib/mini_magick.rb:64:in `mogrify?'
mini_magick (3.7.0) lib/mini_magick/image.rb:360:in `run_command'
mini_magick (3.7.0) lib/mini_magick/image.rb:171:in `valid?'
mini_magick (3.7.0) lib/mini_magick/image.rb:140:in `create'
mini_magick (3.7.0) lib/mini_magick/image.rb:48:in `read'
mini_magick (3.7.0) lib/mini_magick/image.rb:111:in `block in open'
mini_magick (3.7.0) lib/mini_magick/image.rb:110:in `open'
mini_magick (3.7.0) lib/mini_magick/image.rb:110:in `open'
carrierwave (0.9.0) lib/carrierwave/processing/mini_magick.rb:260:in `manipulate!'
Other postings allude to the fact that it may be
a miniMagick version issue. But the localhost version is the same as the server's, as is carrierwave, rails, OSX...
Based on the module documentation, it appears that no processor is being picked up. Thus the installation may have gone awry.
This question is edited as maybe two issues are at hand: different versions of MiniMagick are spawning different behaviours. Both are now separate questions.

Link your identify, convert and other to /usr/local/bin (or /usr/bin) and it will work.
$ which identify
/whatever/identify
$ sudo ln -s /whatever/identify /usr/local/bin
$ which identify
/usr/local/bin/identify
And you need to install:
gem 'mini_magick', '~> 3.5.0'

The problem lies in Passenger v3, and the way it behaves on start-up with Apache. (Passenger 4 apparently does not have the issue)
The solution is the same in any case as per this proposal by editing end of development and/or production environment files with:
ENV['PATH'] = "/usr/local/bin:#{ENV['PATH']}"

Related

Could not find "api_controller.rb" in any of your source paths

I am trying to create a Rails 5 api app using http://alessiofanelli.com/blog/building-a-rails-5-and-ember-js-app.
I get the
could not find api_controller.rb
error while executing the scaffold command as below.
$ rails g scaffold team name:string city:string championships:integer
Running via Spring preloader in process 32480 invoke active_record
identical db/migrate/20160204101609_create_teams.rb identical
app/models/team.rb invoke test_unit identical test/models/team_test.rb
identical test/fixtures/teams.yml invoke resource_route route
resources :teams identical app/serializers/team_serializer.rb invoke
scaffold_controller Could not find "api_controller.rb" in any of your
source paths. Your current source paths are:
/home/kpatil/.gem/ruby/gems/active_model_serializers-0.9.4/lib/active_model/serializer/generators/serializer/templates
Which shows below message in terminal
$ rails s
=> Booting Puma
=> Rails 5.0.0.beta2 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
Puma 2.16.0 starting...
Min threads: 0, max threads: 16
Environment: development
Listening on tcp://localhost:3000 Started POST "/teams" for 127.0.0.1 at 2016-02-04 16:25:06 +0530 ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
ActionController::RoutingError (uninitialized constant TeamsController):
activesupport (5.0.0.beta2) lib/active_support/inflector/methods.rb:259:in const_get' activesupport (5.0.0.beta2) lib/active_support/inflector/methods.rb:259:inblock in constantize'
activesupport (5.0.0.beta2) lib/active_support/inflector/methods.rb:257:in each' activesupport (5.0.0.beta2) lib/active_support/inflector/methods.rb:257:ininject'
activesupport (5.0.0.beta2) lib/active_support/inflector/methods.rb:257:in constantize' actionpack (5.0.0.beta2) lib/action_dispatch/http/request.rb:93:incontroller_class'
actionpack (5.0.0.beta2) lib/action_dispatch/routing/route_set.rb:44:in controller' actionpack (5.0.0.beta2) lib/action_dispatch/routing
I had the same problem that you. I fixed this issue installing:
gem 'active_model_serializers', '~> 0.10.0.rc1'
Before, I had 0.9.4 version for this gem. Now the scaffold generator works fine.
Regards!
Had the same problem & figured out that this also happens if you have active admin installed.
The solution is then to add in your config/application.rb:
config.app_generators.scaffold_controller = :scaffold_controller

Struggling with deploying Rails 3.1 app with Capistrano

We have multiple applications that are currently being deployed using Ruby 1.8.6 with Capistrano. I know, i know, we're working on the upgrade, but these at least deploy just fine.
We have a new application that is running on Ruby 1.8.7, Rails 3.1.11, and we're trying to get deployment going with Bundler and Capistrano. Our applications are in Subversion, and we've always used :deploy_via=>:checkout so that's what i'm trying to use to start.
The behavior i'm seeing is not computing for me, and i've been searching and tweaking for a day or so now:
➜ bundle exec cap deploy
triggering load callbacks
* 2013-11-06 14:13:31 executing `deploy'
* 2013-11-06 14:13:31 executing `deploy:update'
** transaction: start
* 2013-11-06 14:13:31 executing `deploy:update_code'
executing locally: "svn info https://svn-server.com/path/to/branch --username \"myusername\"--password \"mypassword\"--no-auth-cache -rHEAD"
Authentication realm: <https://svn-server.com:443>
Password for 'myusername--password':
*** [deploy:update_code] rolling back
* executing "rm -rf /path/to/deploy/dir/releases/20131106221344; true"
servers: ["myserver.com"]
What seems like the most important line to me:
executing locally: "svn info https://svn-server.com/path/to/branch --username \"myusername\"--password \"mypassword\"--no-auth-cache -rHEAD"
Questions:
Why does 'svn info' even need to be executed locally, when i'm deploying via checkout?
It looks like i'm being prompted for a password because the username/password in the 'svn info' command is being seriously munged??
I'm specifying those credentials in the normal way:
set :scm_username, 'myusername'
set :scm_password, 'mypassword'
Environment info (relevant gems only):
➜ ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [i686-darwin12.4.0]
➜ gem -v
1.8.25
➜ gem list --local
*** LOCAL GEMS ***
actionmailer (3.1.12, 3.1.11, 3.0.20)
actionpack (3.1.12, 3.1.11, 3.0.20)
activemodel (3.1.12, 3.1.11, 3.0.20)
activerecord (3.1.12, 3.1.11, 3.0.20)
activeresource (3.1.12, 3.1.11, 3.0.20)
activesupport (3.1.12, 3.1.11, 3.0.20)
bundler (1.3.5, 1.3.1)
capistrano (2.15.5, 2.14.2)
multi_json (1.8.2, 1.8.1, 1.7.9, 1.7.8, 1.7.7)
mysql (2.9.1)
net-scp (1.1.2, 1.1.0)
net-sftp (2.1.2, 2.1.1)
net-ssh (2.7.0, 2.6.8, 2.6.6)
net-ssh-gateway (1.2.0)
rack (1.3.10, 1.2.8)
rack-cache (1.2)
rack-mount (0.8.3, 0.6.14)
rack-ssl (1.3.3)
rack-test (0.6.2, 0.5.7)
rails (3.1.11, 3.0.20)
rails-console-tweaks (1.0.1, 1.0.0)
railties (3.1.12, 3.1.11, 3.0.20)
rake (10.1.0, 10.0.3)
rcov (1.0.0)
rdoc (4.0.1, 3.12.2)
rdoc-data (4.0.1, 3.12)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
ruby-debug-ide (0.4.9)
rubygems-bundler (1.1.1)
rvm (1.11.3.6)
rvm-capistrano (1.5.1, 1.4.4, 1.4.1)
sprockets (2.0.4)
tzinfo (0.3.38, 0.3.37)
whenever (0.8.4)
wirb (1.0.2, 1.0.1)
wirble (0.1.3)
If there's more info i can post that would help, please let me know.
Any help or guidance would be much appreciated!
try forcing capistrano version 2.15.4 - I heard there was svn bug in the latest version of the 2 branch

Installing/Running Thin Webserver on Rails 3

Having an issue running the "Thin" web server. It looks like installation was successful but when I run "thin start" It appears as though Thin starts to initialize but then cannot find some resources it needs.
Below, is the audit trail from my terminal session. Can someone offer a hand with this? According to the Thin docs, installation was done correctly. Thanks
Rails 3.2.12
ruby 1.9.3
root#pgateway:/var/www/testapp# gem install thin
Fetching: eventmachine-1.0.0.gem (100%)
Building native extensions. This could take a while...
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.0
Successfully installed daemons-1.1.9
Successfully installed thin-1.5.0
3 gems installed
root#pgateway:/var/www/testapp# thin start
>> Using rack adapter
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
/usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends /tcp_server.rb:16:in `connect': cannot load such file -- thin/connection (LoadError)
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `block in start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
You seem to install thin separate from rails
Add it to your gemfile and you should be fine
If you want to use a gem, it must be in your Gemfile. You can solve your problem as follows:
Add the following line to your Gemfile: gem 'thin'
Update your current app's environment: bundle install
Then start server
Try to execute the following command:
cd to/your/rails/app
echo 'gem "thin"' >> Gemfile
thin start
this content from https://github.com/macournoyer/thin/issues/115

Rails 3.2.2 RVM System Wide Capistrano Install Can't Find Gems

I really desperately need help with this issue and am more than a little lost.
I am trying to deploy a new production server using Capistrano Ext to allow for a staging and production server but it fails to run the bundle install --deployment successfully.
The cap staging deploy works fine to an existing Ubuntu system but the new server is a constant fail as follows
my-app$ sh -c 'cd /var/www/html/rails/myapp/releases/20120519174459&& export PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194#global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin && bundle install --deployment'
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Installing rake (0.9.2.2)
Gem::LoadError: Could not find rubygems-bundler (>= 0) amongst []
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.
In any other directory the ruby -v and rails -v produce the expected results
my-home$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
my-home$ rails -v
Rails 3.2.2
A listing of the local Gems on the production servershows they are all available
my-home$ gem list
*** LOCAL GEMS ***
actionmailer (3.2.3, 3.2.2)
actionpack (3.2.3, 3.2.2)
active_utils (1.0.3)
activemerchant (1.21.0)
activemodel (3.2.3, 3.2.2)
activerecord (3.2.3, 3.2.2)
activeresource (3.2.3, 3.2.2)
activesupport (3.2.3, 3.2.2)
addressable (2.2.7)
ansi (1.4.2)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.0.1)
builder (3.0.0)
bundle (0.0.1)
bundler (1.1.3, 1.0.21)
cancan (1.6.7)
capistrano (2.12.0, 2.11.2)
capistrano-ext (1.2.1)
cocaine (0.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3, 1.2.0)
daemon_controller (1.0.0)
devise (2.0.4)
erubis (2.7.0)
execjs (1.3.2, 1.3.0)
faraday (0.7.6)
fastthread (1.0.7)
haml (3.1.4)
hashie (1.2.0)
highline (1.6.12, 1.6.11)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-datatables-rails (1.9.1.3)
jquery-rails (2.0.2, 2.0.1)
jquery-ui-rails (0.3.0)
jruby-pageant (1.0.2)
json (1.7.3, 1.6.5)
libv8 (3.3.10.4 x86_64-linux)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.18, 1.17.2)
minitest (2.11.3)
mocha (0.10.5)
money (3.7.1)
multi_json (1.3.5, 1.1.0)
multipart-post (1.1.5)
mysql2 (0.3.11)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.4.0, 2.3.0)
net-ssh-gateway (1.1.0)
nifty-generators (0.4.6)
oauth (0.4.5)
oauth2 (0.5.2)
omniauth (1.0.3)
omniauth-facebook (1.2.0)
omniauth-google (1.0.1)
omniauth-linkedin (0.0.6)
omniauth-oauth (1.0.1)
omniauth-oauth2 (1.0.0)
omniauth-twitter (0.0.8)
orm_adapter (0.0.6)
paperclip (3.0.2)
passenger (3.0.12)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3, 3.2.2)
railties (3.2.3, 3.2.2)
rake (0.9.2.2)
rdoc (3.12)
RedCloth (4.2.9)
rubygems-bundler (1.0.0)
rvm (1.11.3.3)
sass (3.1.18, 3.1.15)
sass-rails (3.2.5)
simple_form (2.0.1)
simple_oauth (0.1.5)
sprockets (2.1.3, 2.1.2)
sqlite3 (1.3.6)
squeel (1.0.1)
therubyracer (0.10.1, 0.9.10)
thor (0.14.6)
tilt (1.3.3)
timeliness (0.3.4)
treetop (1.4.10)
turn (0.9.4)
twitter (2.2.0)
tzinfo (0.3.33, 0.3.32)
uglifier (1.2.4, 1.2.3)
validates_timeliness (3.0.8)
warden (1.1.1)
will_paginate (3.0.3)
The rvm system wide on the server seems to be correct
my-home$ rvm list
rvm rubies
=* ruby-1.9.3-p194 [ x86_64 ]
# => - current
# =* - current && default
# * - default
my-home$ rvm info
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal settings to allow shell login.
Please visit https://rvm.io/workflow/screen/ for example.
ruby-1.9.3-p194:
system:
uname: "Linux totg01 2.6.38-14-generic #58-Ubuntu SMP Tue Mar 27 20:04:55 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.2.8(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.13.5 (stable) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]"
updated: "4 days 2 hours 5 minutes 13 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p194"
date: "2012-04-20"
platform: "x86_64-linux"
patchlevel: "2012-04-20 revision 35410"
full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"
homes:
gem: "/usr/local/rvm/gems/ruby-1.9.3-p194"
ruby: "/usr/local/rvm/rubies/ruby-1.9.3-p194"
binaries:
ruby: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby"
irb: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/irb"
gem: "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/gem"
rake: "/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake"
environment:
PATH: "/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194#global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
GEM_HOME: "/usr/local/rvm/gems/ruby-1.9.3-p194"
GEM_PATH: "/usr/local/rvm/gems/ruby-1.9.3-p194:/usr/local/rvm/gems/ruby-1.9.3-p194#global"
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.3-p194"
IRBRC: "/usr/local/rvm/rubies/ruby-1.9.3-p194/.irbrc"
RUBYOPT: ""
gemset: ""
But there is an epic fail in the application directory as there is nothing in ./vendor/bundle
app-dir$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
app-dir$ rails -v
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `map!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `materialize'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/definition.rb:127:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/environment.rb:27:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.0/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.0/lib/rubygems-bundler/noexec.rb:59:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.0/lib/rubygems-bundler/noexec.rb:74:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
The system is Ubuntu 11.04 and ruby is installed using rvm system-wide with 1.93 as the default
The deploy.rb is as follows:
# This has been added due to multi deployment staging
set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
default_run_options[:pty] = true
set :user, 'appuser'
set :application, "app"
set :keep_releases, 10
set :deploy_to, "/var/www/html/rails/#{application}"
set :repository, "appuser#gitserver:/myapps/rails/#{application}.git"
set :deploy_via, :copy
set :ssh_options, {:forward_agent => true}
set :scm, :git
set :branch, 'master'
set :scm_verbose, true
set :use_sudo, false
# This has been added due to multi deployment staging
# since :domain is defined in another file (staging.rb and production.rb),
# we need to delay its assignment until they're loaded
set(:domain) { "#{domain}" }
role(:web) { domain }
role(:app) { domain }
role(:db, :primary => true) { domain }
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
desc "cause Passenger to initiate a restart"
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
desc "reload the database with seed data"
task :seed do
run "cd #{current_path}; rake db:seed RAILS_ENV=production"
end
end
before "deploy:assets:precompile", :bundle_install
after "deploy:update_code", :bundle_install
desc "install the necessary prerequisites"
task :bundle_install, :roles => :app do
run "cd #{release_path}&& export PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194#global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin && bundle install --deployment"
run "cp -Rf #{shared_path}/config/* #{release_path}/config/"
end
The other two staging and production files are ....
deploy/staging.rb
set :domain, "staging.myapp.com"
set :rails_env, "staging"
set :default_environment, {
'PATH' => "/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin"
}
deploy/production.rb
set :domain, "production.myapp.com"
set :rails_env, "production"
set :default_environment, {
'PATH' => "/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194#global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/mysql/bin"
}
So the fail is trying to bundle install --deployment in a newly delivered application directory. If bundle install --nodeployment is run it works fine!
What have I done wrong or not configured. I've spent 2 days trying to sort this out but it doen't seem to make any sense why thios won't work
you had to miss the rvm instructions for capistrano: https://rvm.io/integration/capistrano/
just read them, I will advise you to use the gem version which basically will allow you to select proper ruby:
Installation:
gem install rvm-capistrano
Or add to Gemfile:
gem 'rvm-capistrano'
Example Capfile deploy.rb :
set :rvm_type, :system # :user is the default
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system
require "rvm/capistrano" # Load RVM's capistrano plugin.
But better go check the docs, as more options are available: https://rvm.io/integration/capistrano/
Don't use rvm1/capistrano3 or rvm/capistrano; don't set :pty.
Change ~/.rvmrc for the runner user, on the server, to this — note that it has to come before the line where it kills itself when not running interactively:
# get rvm for non-interactive shells (eg capistrano) too
source /etc/profile.d/rvm.sh
export BASH_ENV=$HOME/.bashrc
export rvm_is_not_a_shell_function=0
# If not running interactively, don't do anything
[ -z "$PS1" ] && return

rails 3, why I can't use command line at ubuntu?

I am running RubyMine 4 on Ubuntu 11.10, every thing is fine inside RubyMine, I can run the server, develop, etc .. but, when I need to work on the command line, I just can't do anything ..
I cd to my app directory, then I tried to:
$ rails s
I get:
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
That's is strange, how come its not installed, while I can work normally in RubyMine IDE !
I needed to use command line to uninstall a gem, to discover that I can't use the command line as it should ..
sam#ubuntu:~/Documents/RoR/course_builder$ gem uninstall 'capybara-firebug'
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d capybara-firebug`
$ gem list -d will give me:
*** LOCAL GEMS ***
no gems there ..
if I type :
$ bundle install
I get:
/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require': no such file to load -- rubygems (LoadError)
from /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8
from /usr/lib/ruby/vendor_ruby/bundler.rb:11:in `require'
from /usr/lib/ruby/vendor_ruby/bundler.rb:11
from /usr/bin/bundle:4:in `require'
from /usr/bin/bundle:4
although bundle install inside RubyMine works fine
so, what I am missing here ?!! why I can't use the command line .. ?
here is my gem environment:
RUBYGEMS VERSION: 1.8.10
RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [i686-linux]
INSTALLATION DIRECTORY: /home/sam/.rvm/gems/ruby-1.9.3-p0#global
RUBY EXECUTABLE: /home/sam/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
EXECUTABLE DIRECTORY: /home/sam/.rvm/gems/ruby-1.9.3-p0#global/bin
RUBYGEMS PLATFORMS:
ruby
x86-linux
GEM PATHS:
/home/sam/.rvm/gems/ruby-1.9.3-p0#global
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
----------------------
IDE: JetBrains RubyMine 4.0.1, build #RM-113.20
OS: Linux 3.0.0-16-generic[i386]
Java: 1.6.0_23-b23
RubyMine SDK Environment:
Sdk: RVM: ruby-1.9.3-p0 [global]
Sdk Version: ver.1.9.3p0 ( revision 33570) p0
Ruby Interpreter: /home/sam/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
RVM Sdk: yes, gemset:global
RVM Home: /home/sam/.rvm
Sdk Language Level: 1.9
Sdk Load Path:
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/i686-linux
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/vendor_ruby/1.9.1
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/vendor_ruby/1.9.1/i686-linux
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/vendor_ruby
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/i686-linux
/opt/RubyMine-4.0.1/rubystubs19
Sdk Gem paths:
~/.rvm/gems/ruby-1.9.3-p0#global/bundler/gems
~/.rvm/gems/ruby-1.9.3-p0#global/gems
Gems used for 'hope':
xpath (bundled(0.1.4))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/xpath-0.1.4
rack (1.3.6)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rack-1.3.6
rspec-expectations (2.7.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rspec-expectations-2.7.0
rack-mount (bundled(0.8.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rack-mount-0.8.3
rubyzip (bundled(0.9.5))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rubyzip-0.9.5
bcrypt-ruby (bundled(3.0.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/bcrypt-ruby-3.0.1
activemodel (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/activemodel-3.1.0
client_side_validations (3.1.4)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/client_side_validations-3.1.4
cocoon (bundled(1.0.15))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/cocoon-1.0.15
diff-lcs (1.1.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/diff-lcs-1.1.3
sprockets (2.0.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/sprockets-2.0.3
rack-ssl (1.3.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rack-ssl-1.3.2
simple_form (1.5.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/simple_form-1.5.2
thor (bundled(0.14.6))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/thor-0.14.6
rdoc (3.12)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rdoc-3.12
rubyzip (bundled(0.9.6.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rubyzip-0.9.6.1
foreigner (1.1.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/foreigner-1.1.1
mocha (bundled(0.10.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/mocha-0.10.3
mime-types (bundled(1.17.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/mime-types-1.17.2
treetop (bundled(1.4.10))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/treetop-1.4.10
therubyracer (bundled(0.9.9))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/therubyracer-0.9.9
kaminari (bundled(0.13.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/kaminari-0.13.0
selenium-webdriver (bundled(2.17.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/selenium-webdriver-2.17.0
coffee-script (2.2.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/coffee-script-2.2.0
sass (bundled(3.1.14))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/sass-3.1.14
mail (bundled(2.3.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/mail-2.3.0
rack-mount (0.8.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rack-mount-0.8.3
will_paginate (bundled(3.0.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/will_paginate-3.0.3
i18n (0.6.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/i18n-0.6.0
rspec-mocks (bundled(2.7.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rspec-mocks-2.7.0
ansi (bundled(1.4.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/ansi-1.4.1
orm_adapter (0.0.6)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/orm_adapter-0.0.6
rspec-core (2.7.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rspec-core-2.7.1
pg (0.13.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/pg-0.13.2
metaclass (0.0.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/metaclass-0.0.1
builder (3.0.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/builder-3.0.0
execjs (bundled(1.3.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/execjs-1.3.0
uglifier (bundled(1.2.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/uglifier-1.2.3
jquery-rails (bundled(1.0.19))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/jquery-rails-1.0.19
rspec-expectations (bundled(2.7.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rspec-expectations-2.7.0
bundler (1.0.21)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21
postgres-pr (bundled(0.6.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/postgres-pr-0.6.3
capybara-firebug (bundled(1.0.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-firebug-1.0.1
rspec-rails (bundled(2.7.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rspec-rails-2.7.0
warden (1.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/warden-1.1.0
rails (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rails-3.1.0
sass-rails (3.1.5)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/sass-rails-3.1.5
capybara-firebug (1.0.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/capybara-firebug-1.0.1
rspec (2.7.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rspec-2.7.0
actionpack (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/actionpack-3.1.0
rack (bundled(1.3.6))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rack-1.3.6
mime-types (1.17.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/mime-types-1.17.2
capybara (bundled(1.1.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-1.1.2
nokogiri (1.5.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/nokogiri-1.5.0
rake (0.9.2.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rake-0.9.2.2
nokogiri (bundled(1.5.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/nokogiri-1.5.0
sqlite3 (1.3.5)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/sqlite3-1.3.5
actionmailer (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/actionmailer-3.1.0
therubyracer (0.9.9)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/therubyracer-0.9.9
metaclass (bundled(0.0.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/metaclass-0.0.1
launchy (2.0.5)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/launchy-2.0.5
rack-cache (bundled(1.0.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rack-cache-1.0.3
rdoc (bundled(3.12))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rdoc-3.12
polyglot (0.3.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/polyglot-0.3.3
factory_girl (bundled(2.4.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/factory_girl-2.4.0
tilt (bundled(1.3.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/tilt-1.3.3
uglifier (1.2.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/uglifier-1.2.3
rb-fsevent (bundled(0.4.3.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rb-fsevent-0.4.3.1
uglifier (bundled(1.2.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/uglifier-1.2.2
treetop (1.4.10)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/treetop-1.4.10
warden (bundled(1.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/warden-1.1.0
coffee-script-source (1.2.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/coffee-script-source-1.2.0
execjs (bundled(1.2.13))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/execjs-1.2.13
guard-spork (bundled(0.5.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/guard-spork-0.5.1
ffi (1.0.11)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/ffi-1.0.11
rb-fsevent (bundled(0.9.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rb-fsevent-0.9.0
ffi (bundled(1.0.11))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/ffi-1.0.11
arel (bundled(2.2.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/arel-2.2.1
guard (bundled(1.0.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/guard-1.0.0
kaminari (0.13.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/kaminari-0.13.0
validate_url (bundled(0.2.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/validate_url-0.2.0
coffee-rails (3.1.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/coffee-rails-3.1.1
actionmailer (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/actionmailer-3.1.0
turn (bundled(0.9.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/turn-0.9.2
capybara-webkit (bundled(0.9.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.9.0
coffee-rails (bundled(3.1.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/coffee-rails-3.1.1
rspec-mocks (2.7.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rspec-mocks-2.7.0
childprocess (bundled(0.3.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/childprocess-0.3.1
sprockets (bundled(2.0.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/sprockets-2.0.3
execjs (1.3.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/execjs-1.3.0
tilt (1.3.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/tilt-1.3.3
rspec (bundled(2.7.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rspec-2.7.0
spork (bundled(0.9.0.rc9))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/spork-0.9.0.rc9
rspec-rails (2.7.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rspec-rails-2.7.0
haml (bundled(3.1.4))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/haml-3.1.4
rake (bundled(0.9.2.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rake-0.9.2.2
tzinfo (0.3.31)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/tzinfo-0.3.31
bcrypt-ruby (3.0.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/bcrypt-ruby-3.0.1
pg (bundled(0.13.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/pg-0.13.2
actionpack (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/actionpack-3.1.0
devise (bundled(1.5.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/devise-1.5.2
capybara-webkit (bundled(0.8.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/capybara-webkit-0.8.0
database_cleaner (0.7.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/database_cleaner-0.7.1
foreigner (bundled(1.1.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/foreigner-1.1.1
addressable (bundled(2.2.6))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/addressable-2.2.6
selenium-webdriver (bundled(2.19.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/selenium-webdriver-2.19.0
rspec-core (bundled(2.7.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rspec-core-2.7.1
simple_form (bundled(1.5.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/simple_form-1.5.2
builder (bundled(3.0.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/builder-3.0.0
erubis (bundled(2.7.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/erubis-2.7.0
orm_adapter (bundled(0.0.6))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/orm_adapter-0.0.6
validate_url (0.2.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/validate_url-0.2.0
cocoon (1.0.15)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/cocoon-1.0.15
addressable (2.2.6)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/addressable-2.2.6
haml (3.1.4)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/haml-3.1.4
sass (bundled(3.1.12))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/sass-3.1.12
hike (1.2.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/hike-1.2.1
libv8 (bundled(3.3.10.4))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/libv8-3.3.10.4-x86-linux
coffee-script-source (bundled(1.2.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/coffee-script-source-1.2.0
erubis (2.7.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/erubis-2.7.0
spork (bundled(1.0.0rc2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/spork-1.0.0rc2
factory_girl_rails (bundled(1.5.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/factory_girl_rails-1.5.0
capybara (1.1.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/capybara-1.1.2
tzinfo (bundled(0.3.31))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/tzinfo-0.3.31
mocha (bundled(0.10.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/mocha-0.10.1
jquery-rails (1.0.19)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/jquery-rails-1.0.19
json (1.6.5)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/json-1.6.5
guard (bundled(0.10.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/guard-0.10.0
factory_girl (bundled(2.5.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/factory_girl-2.5.1
factory_girl_rails (bundled(1.6.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/factory_girl_rails-1.6.0
hike (bundled(1.2.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/hike-1.2.1
rack-cache (1.0.3)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rack-cache-1.0.3
activeresource (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/activeresource-3.1.0
railties (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/railties-3.1.0
libv8 (3.3.10.4)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/libv8-3.3.10.4-x86-linux
rack-test (bundled(0.6.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rack-test-0.6.1
sass-rails (bundled(3.1.5))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/sass-rails-3.1.5
i18n (bundled(0.6.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/i18n-0.6.0
multi_json (1.0.4)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/multi_json-1.0.4
sqlite3 (bundled(1.3.5))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/sqlite3-1.3.5
xpath (0.1.4)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/xpath-0.1.4
coffee-script (bundled(2.2.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/coffee-script-2.2.0
activemodel (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/activemodel-3.1.0
turn (bundled(0.8.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/turn-0.8.3
activesupport (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/activesupport-3.1.0
will_paginate (bundled(3.0.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/will_paginate-3.0.2
devise (1.5.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/devise-1.5.2
ansi (bundled(1.4.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/ansi-1.4.2
polyglot (bundled(0.3.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/polyglot-0.3.3
json (bundled(1.6.5))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/json-1.6.5
mail (2.3.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/mail-2.3.0
client_side_validations (bundled(3.1.4))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/client_side_validations-3.1.4
activerecord (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/activerecord-3.1.0
rack-ssl (bundled(1.3.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rack-ssl-1.3.2
guard-spork (bundled(0.5.2))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/guard-spork-0.5.2
childprocess (bundled(0.3.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/childprocess-0.3.0
rack-test (0.6.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/rack-test-0.6.1
activerecord (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/activerecord-3.1.0
arel (2.2.1)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/arel-2.2.1
activesupport (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/activesupport-3.1.0
rails (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/rails-3.1.0
activeresource (bundled(3.1.0))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/activeresource-3.1.0
launchy (bundled(2.0.5))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/launchy-2.0.5
railties (3.1.0)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/railties-3.1.0
ansi (1.4.2)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/ansi-1.4.2
multi_json (bundled(1.0.4))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/multi_json-1.0.4
thor (0.14.6)
~/.rvm/gems/ruby-1.9.3-p0#global/gems/thor-0.14.6
database_cleaner (bundled(0.7.1))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/database_cleaner-0.7.1
diff-lcs (bundled(1.1.3))
~/Documents/RoR/course_builder/CDPATH=/ruby/1.9.1/gems/diff-lcs-1.1.3
EDIT
If I type rvm, I get:
= rvm
* http://github.com/wayneeseguin/rvm
== DESCRIPTION:
RVM is the Ruby enVironment Manager (rvm).
It manages Ruby application environments and switching between them.
== Usage
rvm [Flags] [Options] Action [Implementation[,Implementation[,...]]
== Flags
--default - with 'rvm use X', sets the default ruby for new shells to X.
--debug - Toggle debug mode on for very verbose output.
--trace - Toggle trace mode on to see EVERYTHING rvm is doing.
--force - Force install, removes old install & source before install.
....
== Contributions:
Any and all contributions offered in any form, past present or future, to the
RVM project are understood to be in complete agreement and acceptance with the
Apache Licence v2.0.
== INSTALL:
See http://rvm.beginrescueend.com/rvm/install/
or just use:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
== LICENSE:
Copyright (c) 2009-2011 Wayne E. Seguin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
if I type ruby -v
sam#ubuntu:~/Documents/RoR/course_builder$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
I don't believe your rvm has been setup correctly. For sake of simplicity, let's start from the beginning following the instructions here:
http://beginrescueend.com/rvm/install/
Install in command line.
user$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
Open your .bashrc folder in your home directory.
user$ vim .bashrc
Edit and add:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
Source your .bashrc file and close the terminal
user$ source ~/.bashrc
user$ exit
Reopen terminal and check if rvm is working.
user$ type rvm | head -1
If it returns
rvm is a function
We're good. Check if you have all of the prerequisites:
rvm requirements
Install as necessary. Pick your favorite flavor of ruby (it seems like it is 1.8.7, if so follow the exact command or replace it with your choice).
rvm install 1.8.7
When its done,
rvm use 1.8.7 --default
If this didn't work, please update post by running
which ruby
Try running /bin/bash --login in your command line before doing any rails-related stuff. If it works, do this again in each new command line you open.