rubygems - "bundle install" for Ruby 1.8.7 on Ubuntu Raring Ringtail 13.04 -


i'm not rubyist , there might obvious i'm missing.

i've wrote application in ruby 1.8.7, i'm trying package in vagrant (running raring 13.04), i've run "bundle install" install requirements , though gem1.8 exist, running bundle install still install gems ruby 1.9.3. , program fails @ runtime...

any idea how solve this?

update 1

the related gemfile (thanks first answerers):

ruby '1.8.7'  # ... gem 'trollop' 

but ruby1.8 myfile.rb error raised

no such file load -- trollop (loaderror) 

after investigation, problem looks in bundle install:

your ruby version 1.9.3, gemfile specified 1.8.7 

i don't how solve problem.

update 2

after following advices @klaffenboeck things have changed. i'm using rvm , have ruby 1.8.7 when entering in project folder. bundler seems install things correctly, require seems fail... path problem?

see here detail vagrant / rvm setup: https://rvm.io/integration/vagrant

update 3

problem solved, missing a:

require 'rubygems' 

before gems (it worked locally not in vagrant).

bundler install gems (by default) whichever ruby in path.

try /usr/bin/env ruby -v or which ruby figure out 1 is; guess you're running bundler ruby 1.8.

adding

ruby '1.8.7' 

on top of gemfile diagnose.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -