Installed ruby gem(NMatrix) not showing in irb - permissions

I have installed ruby gem nmatrix with the command below:
sudo gem install nmatrix
I have installed it in ubuntu 12.04 . My gem env is as below:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-05-15 patchlevel 429) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p429
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p429/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-1.9.3-p429
- /usr/local/rvm/gems/ruby-1.9.3-p429#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.github.com/", "http://rubygems.org"]
- REMOTE SOURCES:
- http://gems.github.com/
- http://rubygems.org
Now when I go to irb and run code as below,to use NMatrix it gives error as :
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'nmatrix'
LoadError: cannot load such file -- nmatrix
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):2
from /usr/local/rvm/rubies/ruby-1.9.3-p429/bin/irb:13:in `<main>'
irb(main):003:0>
So what should I do to use nMatrix gem I just installed. Also when i do
gem list
It is not showing nmatrix gem.
Doing
sudo gem list
only shows nmatrix gem.
Thanks.

Related

Tests in circleci wont pass after upgrading ruby and heroku to 20 from 18

I am currently working on an app that uses ruby on rails on the backend and react.js on the front end.
Since Heroku 18 is ending, I decided to start the upgrade to Heroku 20 which will be available till 2025. Since doing so, I have been banging my head against the wall for 2 days. I have updated my dependancies as I believe fit based on documentation, but now 3 of my tests keep failing (using selenium-webdriver, webdriver, and capybarra). The error thrown shows this:
Failures:
1) Posts create post
Failure/Error: fill_in :user_email, with: user.email
Capybara::ElementNotFound:
Unable to find visible field :user_email that is not disabled
# ./spec/support/auth_helper.rb:5:in `login_as'
# ./spec/features/beneficiary/posts/post_spec.rb:7:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:46:in `block (3 levels) in <top (required)>'
# ./spec/rails_helper.rb:45:in `block (2 levels) in <top (required)>'
2) donor dashboard should have nav elements
Failure/Error: fill_in :user_email, with: user.email
Capybara::ElementNotFound:
Unable to find visible field :user_email that is not disabled
# ./spec/support/auth_helper.rb:5:in `login_as'
# ./spec/features/donor/dashboard_spec.rb:7:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:46:in `block (3 levels) in <top (required)>'
# ./spec/rails_helper.rb:45:in `block (2 levels) in <top (required)>'
3) Posts create post
Failure/Error: fill_in :user_email, with: user.email
Capybara::ElementNotFound:
Unable to find visible field :user_email that is not disabled
# ./spec/support/auth_helper.rb:5:in `login_as'
# ./spec/features/donor/posts/post_spec.rb:7:in `block (2 levels) in <main>'
# ./spec/rails_helper.rb:46:in `block (3 levels) in <top (required)>'
# ./spec/rails_helper.rb:45:in `block (2 levels) in <top (required)>'
In the file auth_helper, the format for the fill_in seems to be the issue, but looking at the documentation and confirming the id for user_email to be correct, I don't really understand what is happening at all. I feel like this might be a red herring as it really doesn't seem to be an issue on other tests that use the same method login_as. I tried upping the capybarra timeout time limit as well, and it still seems to fail to the page is certainly loading.
These tests are also passing locally, and only fail when i run them through circleci, which has me baffled and without much understanding of what to try next.
def login_as(user, password: "password")
visit root_path
find('a', text: 'Login').click
fill_in :user_email, with: user.email
fill_in :user_password, with: password
find("input[value='Log in']").click
end
The referenced lines in rails_helper are databaseCleaner and example run lines below:
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
My config.yml is:
# CircleCI 2.0 configuration file
version: 2.1
orbs:
browser-tools: circleci/browser-tools#1.4.0
jobs:
build:
docker:
# specify the version you desire here
- image: cimg/ruby:3.0.5-browsers # circleci/ruby:2.7.0-node-browsers
environment:
PGHOST: 127.0.0.1
PGUSER: $HEROKU_APP_NAME
RAILS_ENV: test
BUNDLER_VERSION: 2.0.2
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
- image: circleci/postgres:9.5-alpine
environment:
POSTGRES_USER: $HEROKU_APP_NAME
POSTGRES_DB: $HEROKU_APP_NAME_test
POSTGRES_PASSWORD: $HEROKU_APP_NAME
- image: redis:4.0.10
working_directory: ~/repo
steps:
- checkout
- browser-tools/install-browser-tools
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v14
nvm alias default 14.21.1
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: Configure Bundler
command: |
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
source $BASH_ENV
gem install bundler
- run:
name: install dependencies
command: |
bundle config set --local path 'vendor/bundle'
bundle install --jobs=4 --retry=3
# --path vendor/bundle
- save_cache:
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
# Database setup
- run: bundle exec rails db:create
- run: bundle exec rails db:schema:load
# frontend
- restore_cache:
keys:
- sell-more-yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- sell-more-yarn-cache-{{ .Branch }}-
- sell-more-yarn-cache-
- run:
name: Yarn Install
command: |
yarn --ignore-engines --cache-folder ~/.cache/yarn
- save_cache:
key: sell-more-yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: Webpacker Pre-Compile
command: bundle exec rails webpacker:compile
# run tests!
- run:
name: run tests
command: |
bundle exec rspec --profile 10 \
--out test_results/rspec.xml \
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
# collect reports
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
workflows:
version: 2
build-and-deploy:
jobs:
- build
Versions:
ruby '3.0.5'
gem 'rails', '~> 6.1'
group :test do
gem 'capybara', '~> 3.38'
gem 'database_cleaner'
gem 'factory_bot_rails', '~> 6.2.0'
gem 'rack_session_access'
gem 'rails-controller-testing'
gem 'rspec-rails'
gem 'selenium-webdriver', '~> 4.0'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'shoulda-matchers', '~> 4.4'
gem 'spring-commands-rspec'
gem 'stripe-ruby-mock', github: 'rebelidealist/stripe-ruby-mock'
gem 'timecop'
gem 'webdrivers', '~> 5.2'
gem 'webmock'
end
Anyone have any ideas to help me get past this as I am falling behind on time and could really use a point in the right direction!
Thanks in advance!
I am expecting these tests to pass as they can locally and should be able to on circleci as they were right before the upgrade.

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.0, RVM: still getting "Could not find ... in any of the sources (Bundler::GemNotFound)"

I have following (and have shortened the full path to "/.../"):
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.21
- RUBY VERSION: 1.9.2 (2012-02-14 patchlevel 318) [x86_64-linux]
- INSTALLATION DIRECTORY: /.../.rvm/gems/ruby-1.9.2-p318#rails-3.0
- RUBY EXECUTABLE: /.../.rvm/rubies/ruby-1.9.2-p318/bin/ruby
- EXECUTABLE DIRECTORY: /.../.rvm/gems/ruby-1.9.2-p318#rails-3.0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /.../.rvm/gems/ruby-1.9.2-p318#rails-3.0
- /.../.rvm/gems/ruby-1.9.2-p318#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
As you can see I have #global and #rails-3.0 gemsets. Passenger 3.0.11 is installed in the #global gemset, and I have a .rmvrc file in my application root:
rvm ruby-1.9.2-p318#rails-3.0
However, after running $ bundle install and restarting the app via $ touch tmp/restart.txt I keep getting the Passenger error screen with the following:
Error message: Could not find aaronh-chronic-0.3.9 in any of the sources (Bundler::GemNotFound)
This gem is installed in the #rails-3.0 gemset
Gemfile here.
$ gem list here
If I install the aaronh-chronic gem in the #global gemset, then it just complains about the next one in line. It's like it is only checking the #global gemset instead of first looking in my #rails-3.0 gemset. How can I get it to use both gemsets? (Full backtrace here.)
UPDATE: Here is my Passenger Apache configuration:
# In /etc/apache2/mods_available/passenger.load
LoadModule passenger_module /.../.rvm/gems/ruby-1.9.2-p318#global/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
# In /etc/apache2/mods_available/passenger.conf
<IfModule mod_passenger.c>
PassengerRoot /.../.rvm/gems/ruby-1.9.2-p318#global/gems/passenger-3.0.11
PassengerRuby /.../.rvm/wrappers/ruby-1.9.2-p318#global/ruby
</IfModule>
Try bundle update and gem update --system.

"rails server" not working

I am using window 7.
I have upgraded rails 2.0.2 to rails 3.0.9 with ruby as 1.8.7. I have changed in evironment.rb as:
RAILS_GEM_VERSION = '3.0.9' unless defined? RAILS_GEM_VERSION
still I am unable to start server.
RubyGems Environment:
- RUBYGEMS VERSION: 1.7.2
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: C:/InstantRails-2.0-win/ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/InstantRails-2.0-win/ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8
- C:/Users/SUKETA/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.github.com", "http://rubygems.org/"]
- REMOTE SOURCES:
- http://gems.github.com
- http://rubygems.org/
Any suggestion
Maybe it can help you:
http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1
Is part of a complete guide that explain how to do this migration on the right way.
However according to http://weblog.rubyonrails.org/2010/9/4/ruby-on-rails-2-3-9-released (official Rails blog) it is recommended to first migrate to Rails 2.3.9
Migrating from rails 2.0.2 to Rails 3 isn't exactly a simple task. To give you an idea Ryan Bates made 3 screencast about this. You can find out more here; http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1

Ubuntu RVM install issue rvm_ruby_src_path not set

Following instructions from http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/ I get to the following line:
rvm install 1.9.2
returns:
ruby-1.9.2-p0 - #fetching
ruby-1.9.2-p0 - #extracting ruby-1.9.2-p0 to
mv: cannot move `/tmp/rvm_src_18035/ruby-1.9.2-p0' to `': No such file or directory
~/.rvm/scripts/manage: line 1237: ruby-1.9.2-p0 - #extracted to : command not found
Running autoconf
Error running 'autoconf', please check ~/.rvm/log/ruby-1.9.2-p0/autoconf*.log
Skipping configure step, 'configure' does not exist, did autoconf not run successfully?
ruby-1.9.2-p0 - #compiling
Error running 'make ', please check ~/.rvm/log/ruby-1.9.2-p0/make*.log
There has been an error while running make. Halting the installation.
looking at .rvm/scripts/manage it seems that $rvm_ruby_src_path is not set. Am I missing anything in my setup? Below are more details on my environment:
$ rvm info
system:
system:
uname: "Linux host 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:21:58 UTC 2010 x86_64 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.0.7 by Wayne E. Seguin (wayneeseguin#gmail.com) [http://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/bin/ruby"
irb: "/usr/bin/irb"
gem: "/usr/bin/gem"
rake: "/usr/bin/rake"
environment:
PATH: "~/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
GEM_HOME: ""
GEM_PATH: ""
BUNDLE_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- ~/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
- http://rubygems.org/
I just reinstalled my mac, and got the same problem.
Edit: after I run rvm update && rvm reload, it works!