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: .

202 questions
0
votes
1 answer

Using Active Merchant on Ruby 1.8.7

I am using Site5 to host my site, and which limits me to use ruby 1.8.7. However, I can't install the Active Merchant gem because it has Money as a dependancy - which requires Ruby 1.9.2! Is there any way to work around this? Perhaps declaring a…
cadlac
  • 2,410
  • 3
  • 15
  • 30
0
votes
1 answer

rake gems:install failing in rails 2 app for mystifying reasons

I am trying to get a rails 2.3.12 project running in my local development environment, but I cannot seem to install the needed gems. Here are the ruby/rails versions I am using: $ rvm list rvm rubies ... => ruby-1.8.7-p371 [ i686 ] ... $ rails…
0
votes
1 answer

updated? method in Rails3.1

I am upgrading a rails3.0 app to rails3.1.10 I have model class User < ActiveRecord::Base belongs_to :account ..... def some_method return unless self.account.updated? ....... end end but .updated? method seems to be removed from…
user1136228
  • 877
  • 9
  • 19
0
votes
1 answer

Apache / Passenger / Rails app exiting during startup

I'm new to Ruby on Rails and have inherited a pretty large legacy app that I need to get running in a dev environment. I've created a OSX Mountain Lion virtual machine from scratch to use as my dev box. I'm running with ruby 1.8.7 & rails 2.2.2. I…
plamoreux
  • 1
  • 3
0
votes
0 answers

How does a bigdecimal's precision change upon converting to string?

I stumbled upon a very weird behaviour. A normal bigdecimal value when converted to string using to_s method changes it's behaviour. There is a normal float column in my table and a record has the value 37502 When I fetch the record and print it in…
ZX12R
  • 4,594
  • 6
  • 36
  • 53
0
votes
1 answer

dynamically set value of textfield rjs rails

I am trying to set the value of the hidden text field through rjs. I have a form. <% form_tag :action => "upload" do %> <%= file_field_tag :zipfile %> <%= submit_tag "Upload" %> <%= hidden_field_tag "progress" %> <% end %> I want to set…
Sadiksha Gautam
  • 4,604
  • 6
  • 35
  • 67
0
votes
1 answer

Sorting a ruby hash with underscore in keys

I usually sort ruby hashes using the very famous sort method as given in my example below. But this terribly fails when the string key has an underscore in it. For eg: h = {"b" => 1, "a" => 2} Hash[h.sort] sorts the hash perfectly. But when the…
Aravind
  • 213
  • 4
  • 13
0
votes
1 answer

Ruby 1.8.7 RegExp doesn't work with meta-character "\h"

If I run this in a 1.8.7 console: $ irb-ruby-1.8.7-p330 1.8.7 :001 > "0a" =~ /\h\h/ => nil And if I run the same in a 1.9.2 console: $ irb-ruby-1.9.2-p290 1.9.2p290 :001 > "0a" =~ /\h\h/ => 0 :/
fguillen
  • 29,929
  • 17
  • 114
  • 172
0
votes
5 answers

Downgrading from Rails 3.2.6 to 3.0.11

I am facing issue when I am trying to work with rails 3.0.11. I initially worked with rails 3.2.6. Build a prototype application in Rails 3.2.6, Ruby 1.9.2 and gem 1.8.7. But then found, server on which we need to host is a shared server which can…
Gun
  • 61
  • 1
  • 9
0
votes
2 answers

Sort by sql query using a url param

I have this huge ugly query below, i'd like to sort by it in a catalog view. Thinking something like http://wow.dev:3000/catalog_items?&order=deals. A million thank yous in advance for any comments or answers. select 100 - round((current_price…
jahrichie
  • 1,144
  • 2
  • 16
  • 24
0
votes
1 answer

Rails 2.3 + Ruby 1.8.7 incompatible character encodings: UTF-8 and ASCII-8BIT

I've been having this problem in the index.rhtml of our app. Basically, I have a dynamic div in the page w/c displays all the information of the currently signed in user's projects. Here is a snippet where the error occurs: <% projects.each do |p|…
Normz
  • 271
  • 1
  • 2
  • 9
0
votes
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.
  • 7,717
  • 6
  • 39
  • 66
0
votes
1 answer

Create a class to populate page in ruby 1.8.7

I'm trying to make a class to populate a deals tab on my website. Part 1. Take an items close date (CatalogItem.close_date) and use all items within 12 hours of closing. Part 2. Calculate the deal percentage by using the current price…
jahrichie
  • 1,144
  • 2
  • 16
  • 24
0
votes
1 answer

Time fields in Rails app all getting populated with January 1, 2000, 12:00AM

I'm using Time to hold the start and end dates within an events controller I'm working on. However my application is neglecting to submit the Time information, in both test and development environments, both in the browser and in my Rspec tests. A…
Reb
  • 639
  • 1
  • 6
  • 12
-1
votes
1 answer

rvm install 1.8.7 returns " Error running '__rvm_make -j4' "

I am trying to install ruby 1.8.7 in Ubuntu 18.04.1 LTS. It Says "Error running '__rvm_make -j4',". It seems to be a openssl problem for me. But I am not sure how to fix it. Last 20 lines are copied below. Please help me to find a fix for installing…
1 2 3
13
14