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
17
votes
2 answers

How can I find a memory leak on Heroku?

I have a Rails 3.2.8 app running on Heroku Cedar with Ruby 1.9.3. The app runs fine when it launches but after a day or so of continuous use, I start to see R14 errors on my logs. Once the memory errors start, they never go away, even if the app is…
Marty M.
  • 173
  • 1
  • 5
15
votes
8 answers

Skipping the first line when reading in a file in 1.9.3

I'm using ruby's File to open and read in a text file inside of a rake task. Is there a setting where I can specify that I want the first line of the file skipped? Here's my code so far: desc "Import users." task :import_users => :environment…
Andrew Lauer Barinov
  • 5,694
  • 10
  • 59
  • 83
15
votes
5 answers

ruby_threadptr_data_type error

I'm starting up a new rails app with the latest version of rails (3.1.3). Rails crashes when I try to start up the server. First I fixed this bug, and now I'm getting this one ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol:…
declan
  • 5,605
  • 3
  • 39
  • 43
14
votes
4 answers

Ruby 1.9.3 breaks rake test

I have an existing rails 3 project that works just fine on ruby 1.9.2-p290. However upgrading to ruby 1.9.3-p0 causes rake test to spit out the following error: /Users/zmanji/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:167:in `block in…
Zameer Manji
  • 3,017
  • 5
  • 31
  • 42
14
votes
4 answers

Set UTF-8 as default for Ruby 1.9.3

I'm on Rails 4 and Ruby 1.9.3 I use "strange" characters very often, so I have to declare UTF-8 encoding at the top of all .rb files. Is there any way to set UTF-8 as the default encoding for Ruby 1.9.3? I tried all answers, but when running rake…
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232
14
votes
4 answers

Ruby on Linux PTY goes away without EOF, raises Errno::EIO

I'm writing some code which takes a file, passes that file to one of several binaries for processing, and monitors the conversion process for errors. I've written and tested the following routine on OSX but linux fails for reasons about which I'm…
voxobscuro
  • 2,132
  • 1
  • 21
  • 45
14
votes
3 answers

Errors::SignatureDoesNotMatch, AWS-SDK gem for S3 support on paperclip 3.0.1 and rails 3.2

I'm migrating my app from Rails 3.0.9 to 3.2.3 and ruby 1.9.3. I was using paperclip(2.3.11) with aws-s3 gem to store my pictures. Now I want to use the last version of paperclip(3.0.1) and then I have to use aws-sdk gem. I've set my aws.yml file…
Bachet
  • 321
  • 1
  • 2
  • 14
13
votes
6 answers

Is it possible to run my Rails app on Heroku with Ruby 1.9.3? If so, how?

I tried this tip: https://github.com/thoughtbot/laptop/pull/14#issuecomment-3192270 . On deploy I see -----> Using RUBY_VERSION: ruby-1.9.3-p0 But my logs show the environment variable is not respected INFO ruby 1.9.2 (2011-07-09)…
Gabe Kopley
  • 16,281
  • 5
  • 47
  • 60
13
votes
3 answers

What does mean both the operators * and (*) in ruby?

I just introduced myself to the Ruby splat oprator. And I played with it lot's of way. but the below experiment somehow made me think about it twice :) langs = ["java", "csharp", "ruby", "haskell" ] # => ["java", "csharp", "ruby", "haskell"] …
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
13
votes
1 answer

how to get the current URL of a webpage in selenium-webdriver

I am using selenium webdriver to do some automation on browser. now there is a need to get the current url of the page currently opened in the browser. I wrote the below code but giving me error: element = driver.find_element :name =>…
DoLoveSky
  • 777
  • 1
  • 6
  • 17
12
votes
4 answers

Error on terminal start

-bash: /etc/profile.d/rvm.sh: No such file or directory -bash: /Users/janekambani/.bash_profile: line 1: conditional binary operator expected -bash: /Users/janekambani/.bash_profile: line 1: syntax error near `"$HOME/.rvm/scripts/rvm"' -bash:…
user1288305
  • 121
  • 1
  • 3
12
votes
3 answers

Rails/Rack: "ArgumentError: invalid %-encoding" for POST data

Our ruby on rails site has a URI that one of our partners POSTs XML data to. Since we don't want to deal with XML, we literally just stuff the raw data into a database column and don't go any further with processing it. However, one of the posts we…
Gabe Durazo
  • 1,789
  • 2
  • 19
  • 27
12
votes
2 answers

What is the difference between =~ and match() when pattern matching?

I am using Ruby 1.9.3. I was playing with some patterns and found something interesting: Example 1: irb(main):001:0> /hay/ =~ 'haystack' => 0 irb(main):003:0> /st/ =~ 'haystack' => 3 Example 2: irb(main):002:0> /hay/.match('haystack') =>…
DoLoveSky
  • 777
  • 1
  • 6
  • 17
11
votes
1 answer

Error installing ruby 1.9.3 from rvm on ubuntu 11.04

Error ruby-1.9.3-p0 - #extracted to /home/bhaarat/.rvm/src/ruby-1.9.3-p0 Fetching yaml-0.1.4.tar.gz to /home/bhaarat/.rvm/archives Extracting yaml-0.1.4.tar.gz to /home/bhaarat/.rvm/src Configuring yaml…
Omnipresent
  • 29,434
  • 47
  • 142
  • 186
11
votes
2 answers

What does Module.private_constant do? Is there a way to list only private constants?

Starting in Ruby 1.9.3, we can create private constants: module M class C; end private_constant :C end Is there a good documentation about what this does? Is there a way to get the names of only private constants similar to calling constants
sawa
  • 165,429
  • 45
  • 277
  • 381
1
2
3
32 33