Questions tagged [ruby-1.8.7]

For issues relating to developing in Ruby, version 1.8.7.

Use this specific tag along with the generic one: .

203 questions
1
vote
1 answer

can't start rails server, getting a lot of "load errors"

I am trying to setup an existing project of friends on my ubuntu i installed ruby ree-1.8.7 with rvm and ran the rvm use command to switch to that ruby. then ran bundle install in the app folder and it installed all the gems (there are a lot) now…
guy schaller
  • 4,710
  • 4
  • 32
  • 54
1
vote
2 answers

Heroku could not find bundler error

I have an old Rails 2.3.8 app using Ruby 1.8.7-p352 that I've been trying to migrate to Heroku's cedar stack. Everything works in development, deployment goes fine, but I'm getting an App Crashed error when I try to access the…
Dreyfuzz
  • 486
  • 2
  • 13
1
vote
1 answer

Is there a trick to profiling memory usage w/ ruby-prof using an rvm gemset?

I've been trying to get ruby-prof working for memory usage on Mac OS X w/ Ruby 1.8.7 and so far I'm not having much luck. I understand from the documentation that RubyProf::MEMORY mode requires a patched version of Ruby. I've tried installing the…
Dan Tao
  • 125,917
  • 54
  • 300
  • 447
1
vote
1 answer

Installing gems in Mac OS X pre-installed ruby 1.8.7

Macs seem to all come with ruby 1.8.7 pre-installed. That's fine for my purposes, but when I install gems with either gem install gem-name or sudo gem install gem-name, I have to explicitly add the gem's lib directory to my $LOAD_PATH at the top of…
at.
  • 50,922
  • 104
  • 292
  • 461
1
vote
2 answers

NoMethodError for plus sign in ruby

I am really new at ruby. I have created a function to count occurrences of words in a string. However, I am getting NoMethodError for + all the time. I searched, tried different variations, but couldn't solve the problem. Here is the code: def…
mert
  • 1,942
  • 2
  • 23
  • 43
1
vote
2 answers

How do I adapt a Ruby 1.9.3 app to work on a Server using Ruby 1.8.7

I have an app written with Ruby 1.9.3 with Rails 3.2.6. After the fact I'm deploying on Bluehost, no choice here, who has Ruby 1.8.7 on the server. I'm getting the different time format error on my gems. I can edit them on the server but next…
jasonw
  • 122
  • 6
1
vote
2 answers

Downgrade whole ruby app to 1.8.7

I've built a rails app on my local host using Ruby 1.9.3, it works great and does everything it's supposed to do locally. However, I'm using dreamhost as a cheap host for this app and it turns out that their install of passenger only supports up to…
1
vote
2 answers

Conflicting if-statements in Ruby

I tried running this code in an online IDE supporting Ruby 1.8.7, and the elsif statement isn't being recognized; e.g., if I type in "85", it still returns "Over-Weight". def prompt print ">> " end puts "Welcome to the Weight-Calc 3000! Enter your…
GardenQuant
  • 143
  • 4
  • 11
1
vote
2 answers

I can't install ruby 1.8.7

I want to install ruby 1.8.7 and uninstall ruby 1.9.2 from main. Please don't suggest rvm as I do have that. But ruby 1.9.2p0 is sticked to my system.. I tried sudo apt-get remove ruby, it removes ruby, but when i run ruby -v it shows ruby 1.9.2p0…
user1571530
1
vote
1 answer

ruby 1.8.7 to_proc creates empty arrays

This is a follow-up to to this answer, regarding ruby 1.8.7's Symbol#to_proc generating a new proc every invocation. There seems to be more going on than the answers suggest. Here's some sample code: def ctob h=Hash.new(0) …
Kelvin
  • 20,119
  • 3
  • 60
  • 68
1
vote
0 answers

How do I load assets from a gem?

Can anyone help me? I don't know how to add assets(js, stylesheets, images) and views from my gem to the rails environment during runtime. This result to template not found errors whenever I'm trying to access url paths indicated by the routes.rb of…
1
vote
1 answer

How do pack and unpack guesses the character encoding when converting to and from utf8?

Suppose I want to convert "\xBD" to UTF-8. If I use pack & unpack, I'll get ½: puts "\xBD".unpack('C*').pack('U*') #=> ½ as "\xBD" is ½ in ISO-8859-1. BUT "\xBD" is œ in ISO-8859-9. My question is: why pack used ISO-8859-1 instead of ISO-8859-9…
Sony Santos
  • 5,435
  • 30
  • 41
1
vote
7 answers

RegExp: How to exclude whitespace

Considering Ruby 1.8.7 or Javascript. I have the following string: (GMT+02:00) Istanbul and I want to capture everything after the ) (note the whitespace included after the close parentheses) The regexp I have created is almost working with…
Kleber S.
  • 8,110
  • 6
  • 43
  • 69
1
vote
1 answer

Issue installing 1.8.7 p358 under RVM

After getting Xcode rvm install 1.9.3 works totally fine. However, rvm install 1.8.7 throws the following error. ~ ☺ rvm install 1.8.7 Installing Ruby from source to: /Users/jordanscales/.rvm/rubies/ruby-1.8.7-p358, this may take a while depending…
Jordan Scales
  • 2,687
  • 4
  • 28
  • 37
1
vote
1 answer

How to replace an unicode quotation marks with an ascii in ruby 1.8?

How to find and replace unicode quotation marks in ruby 1.8.7? For example, from: “Good morning.” to: 'Good morning.'
ohho
  • 50,879
  • 75
  • 256
  • 383