Questions tagged [ruby-1.9.3]

For issues relating to developing in Ruby, version 1.9.3. If your question applies to Ruby in general, use the tag [tag:ruby].

Related tags

495 questions
0
votes
1 answer

Ruby: How to get colors in testrb

Is there any way to get colors via testrb that does not involve adding test-unit to the gemfile and using bundle exec on 1.9 (everything colored in 1.8)? ruby test/xxx_test.rb -> colors testrb test/xxx_test.rb -> no colors Add test-unit to the…
grosser
  • 14,707
  • 7
  • 57
  • 61
0
votes
1 answer

How To Do Ruby on Rails link_to with a method in a controller

I am using bcrypt-ruby for password encryption. In the documentation for the gem http://bcrypt-ruby.rubyforge.org/ they give an action to allow someone to reset their password. I am trying to implement this action. I added the following code on my…
0
votes
1 answer

MongoDB Ruby atomic additive update issues

coll.save({"_id" => "test", "1" => "a"}) #=> {"_id"=>"test", "1"=>"a"} coll.update({"_id" => "test"}, {"$set"=>{"1.2" => "b"}}) #=> {"_id"=>"test", "1"=>"a"} I was expecting that last line would create a new node: {"_id"=>"test", "1"=>{"2"=>"b"}}…
Mr. Demetrius Michael
  • 2,326
  • 5
  • 28
  • 40
0
votes
2 answers

ruby block questions loop variables

comics = load_comics( '/comics.txt' ) Popup.make do h1 "Comics on the Web" list do comics.each do |name, url| link name, url end end end I am new to ruby. This is a piece of code from a ruby website. I cant find what 'link'…
runcode
  • 3,533
  • 9
  • 35
  • 52
0
votes
1 answer

undefined method `gsub'...(NoMethodError) for docusign

After installing the docusign gem and dependent soap4r gem via github (git://github.com/felipec/soap4r.git), I get this issue when trying to run the server user$ rails…
Jonathan Mui
  • 2,471
  • 3
  • 19
  • 27
0
votes
1 answer

Rails Module issue - undefined method 'validates_email' for User:class

I have a class called User, that needs to include a module. The class looks like this: require 'sequel' require 'modules/validations' class User < Sequel(..) many_to_one :country includes ::Validations validates_email(:email) end The module…
codingbunny
  • 3,989
  • 6
  • 29
  • 54
-1
votes
1 answer

How can connect routes in rails 3 using folders?

I'm getting an error No route matches [GET] because trying to create folders per certain controllers Here the app structure: |controller,helper,view| |user_management| ------> FOLDER |user| ------> SUBFOLDER |login| ------>…
Carlos Morales
  • 1,137
  • 3
  • 15
  • 38
-1
votes
1 answer

installing insoshi in rails 4 with ruby 1.9.3 in windows 7

I am trying to use Insoshi in Rails 4 and everything works fine until the $ script/install. Whenever I put this command in my command prompt I get this error: 'script' is not recognized as an internal or external command, operable program or batch…
-1
votes
1 answer

Rails console, wierd issue

I type the following: >> x.inspect "\"53219847091d6601dd000004\"" >> "53219847091d6601dd000004".inspect "\"53219847091d6601dd000004\"" >> "53219847091d6601dd000004"==x false They are the same so why they are not equal to each other?
Chen Kinnrot
  • 20,609
  • 17
  • 79
  • 141
-1
votes
1 answer

Dynamic initialization using loops in ruby

Simple problem in looping and dynamic assignment, need suggestion. Problem: @var = 1 def meth @values = (#here a query uses @var value to calculate and returns some values) end meth #calling meth function # value of @value increaser when i…
Aparichith
  • 1,452
  • 4
  • 20
  • 40
-1
votes
3 answers

Create a two separate arrays from existing array in ruby

I have a array of n elements say snaps = ["s-1","s-2","s-3","s-4",..."s-n-2","s-n-1","s-n"] now I want to create two diff array such that one array contains last 5 elements and another contains remaining elements.For example snap1 =…
r15
  • 486
  • 1
  • 8
  • 22
-1
votes
2 answers

String "<<" operator producing warnings and unexpected result in Ruby1.9.3

Please find the code which I ran from the IRB terminal: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\rakshiar>irb irb(main):001:0> src = 'E:\WIPData\Ruby\Scripts\TaxDocumentDownload' =>…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
-2
votes
1 answer

Can't install the pg gem

On Mac OS X 10.6.8, I get the following error when trying gem install pg. Trying to push my Rails website to Heroku. A pretty standard install of Ruby 1.9.3p194. $ cat /Users/me/.rvm/gems/ruby-1.9.3-p194\@ucode/gems/pg-0.15.1/ext/gem_make.out…
-3
votes
2 answers

Ruby seeing namespace prefix that isn't there

I'm packaging my own gem, which includes a module called Convert3D, and a class called ShapeSet. The following error occurs when I try to call a method of the Convert3D module from within the initialize method of ShapeSet. The Convert3D module has…
Nat
  • 2,689
  • 2
  • 29
  • 35
-5
votes
1 answer

How the floating point directive works in Ruby packing()/unpacking()?

Can any one here help me out to understand how the below floating point directives work in Ruby with packing() and unpacking() method? D and d F and f g and G e and E I have tried below: irb(main):001:0> [2,44,43].pack('D') =>…
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
1 2 3
32
33