# Uncategorized

**URL:** https://www.ruby-forum.com/c/uncategorized/1.md?page=6

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 7

---

## [Keep getting main:Object (NameError)](https://www.ruby-forum.com/t/keep-getting-main-object-nameerror/259515)

<div class="topic-metadata">

**Author:** [@ibz95](https://www.ruby-forum.com/u/ibz95)\
**Replies:** 3\
**Last updated:** [May 8, 2020, 5:10pm UTC](https://www.ruby-forum.com/t/keep-getting-main-object-nameerror/259515 "2020-05-08T17:10:34Z")

</div>

I want to write a code in Ruby that reads in information from a file and prints it out as an array in the terminal. This is what I have so far: class Track attr\_accessor :name, :location def initialize (name, location…

---

## [Keep getting undefined method \`length' for nil:NilClass (NoMethodError) error](https://www.ruby-forum.com/t/keep-getting-undefined-method-length-for-nil-nilclass-nomethoderror-error/259482)

<div class="topic-metadata">

**Author:** [@ibz95](https://www.ruby-forum.com/u/ibz95)\
**Replies:** 5\
**Last updated:** [May 5, 2020, 4:23pm UTC](https://www.ruby-forum.com/t/keep-getting-undefined-method-length-for-nil-nilclass-nomethoderror-error/259482 "2020-05-05T16:23:54Z")

</div>

I have written the following code in Ruby that takes input from a user regarding plane and flight details and displays the user inputs as an array in the terminal. For example, if the user enters 3 then the program reads…

---

## [How to get selected option in dropdown menu?](https://www.ruby-forum.com/t/how-to-get-selected-option-in-dropdown-menu/259478)

<div class="topic-metadata">

**Author:** [@ghjgjh](https://www.ruby-forum.com/u/ghjgjh)\
**Replies:** 0\
**Last updated:** [May 5, 2020, 6:07am UTC](https://www.ruby-forum.com/t/how-to-get-selected-option-in-dropdown-menu/259478 "2020-05-05T06:07:16Z")

</div>

I was wondering how to get the selected option in dropdown menu. \<% @quiz.codes.each do |code| %\> \<%= simple\_format code.code %\> \<%= simple\_format code.notes %\> \<%= form\_with(model: \[ c…

---

## [Convert a array of string](https://www.ruby-forum.com/t/convert-a-array-of-string/259252)

<div class="topic-metadata">

**Author:** [@ChiragArya](https://www.ruby-forum.com/u/ChiragArya)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 7:24pm UTC](https://www.ruby-forum.com/t/convert-a-array-of-string/259252 "2020-04-20T19:24:07Z")

</div>

I have a array of strings \[“U1,U2”, “U3,U4”, “U2,U1”, “U1,U5”\] I want to remove the duplicate pairs and also sort on the basis of their 0th index in alphabetical order like \[“U1,U2”, “U1,U5”,“U3,U4”\]

---

## [Validating phone number with country code for (Twilio)](https://www.ruby-forum.com/t/validating-phone-number-with-country-code-for-twilio/259430)

<div class="topic-metadata">

**Author:** [@dcoder](https://www.ruby-forum.com/u/dcoder)\
**Replies:** 2\
**Last updated:** [May 1, 2020, 7:41pm UTC](https://www.ruby-forum.com/t/validating-phone-number-with-country-code-for-twilio/259430 "2020-05-01T19:41:47Z")

</div>

Greetings, I am trying to build a regex that checks whether or not a phone number is formatted correctly for Twilio. validates\_format\_of :phone\_number, :with =\> … If the format is incorrect, Twilio is unable to send ba…

---

## [Rbenv problem with multiple OpenSSL versions required by different Ruby versions](https://www.ruby-forum.com/t/rbenv-problem-with-multiple-openssl-versions-required-by-different-ruby-versions/258949)

<div class="topic-metadata">

**Author:** [@JackRG](https://www.ruby-forum.com/u/JackRG)\
**Replies:** 1\
**Last updated:** [April 29, 2020, 10:51pm UTC](https://www.ruby-forum.com/t/rbenv-problem-with-multiple-openssl-versions-required-by-different-ruby-versions/258949 "2020-04-29T22:51:33Z")

</div>

I’ve been using Ruby 2.0.0 since 2013, and am finally being pushed to upgrade to a newer version for my Rails apps. I determined that I need to upgrade to at least 2.5.7. So, using rbenv to support multiple Ruby versions…

---

## [Learning and developing Ruby on rails](https://www.ruby-forum.com/t/learning-and-developing-ruby-on-rails/259388)

<div class="topic-metadata">

**Author:** [@Vrick6749](https://www.ruby-forum.com/u/Vrick6749)\
**Replies:** 1\
**Last updated:** [April 29, 2020, 5:37pm UTC](https://www.ruby-forum.com/t/learning-and-developing-ruby-on-rails/259388 "2020-04-29T17:37:34Z")

</div>

Hi guys, Sorry if this post is a nuisance, I am currently in CoderAcademy so far I have learnt CSS, Ruby, HTML, and now I am currently doing RAILS… Based on what I have heard rails is “Easy”, but at the moment I seem to…

---

## [How to turbo-charged you Ruby apps](https://www.ruby-forum.com/t/how-to-turbo-charged-you-ruby-apps/259399)

<div class="topic-metadata">

**Author:** [@Asimov](https://www.ruby-forum.com/u/Asimov)\
**Replies:** 0\
**Last updated:** [April 29, 2020, 11:30am UTC](https://www.ruby-forum.com/t/how-to-turbo-charged-you-ruby-apps/259399 "2020-04-29T11:30:16Z")

</div>

Turn them in C with Mruby: http://mruby.org/ Making a game in Ruby won’t be a problem anymore.

---

## [Nokogiri not parsing the whole document](https://www.ruby-forum.com/t/nokogiri-not-parsing-the-whole-document/259381)

<div class="topic-metadata">

**Author:** [@Phimer951](https://www.ruby-forum.com/u/Phimer951)\
**Replies:** 0\
**Last updated:** [April 28, 2020, 10:27am UTC](https://www.ruby-forum.com/t/nokogiri-not-parsing-the-whole-document/259381 "2020-04-28T10:27:31Z")

</div>

Hi, I want to scrape the data of each of the products of the following link: Zähleranschlußsäulen TEN Thüringer Energienetz The problem is that the output always give me the value of the first product, but not of the ot…

---

## [Interesting timing results between CRuby, JRuby, and TruffleRuby](https://www.ruby-forum.com/t/interesting-timing-results-between-cruby-jruby-and-truffleruby/259360)

<div class="topic-metadata">

**Author:** [@jzakiya1](https://www.ruby-forum.com/u/jzakiya1)\
**Replies:** 0\
**Last updated:** [April 25, 2020, 3:00am UTC](https://www.ruby-forum.com/t/interesting-timing-results-between-cruby-jruby-and-truffleruby/259360 "2020-04-25T03:00:59Z")

</div>

Here are some interesting timing comparison between CRuby, JRuby, and TruffleRuby on a Rosetta Code task I just posted. Post what you get on your system. Th 2020/4/24 Self describing numbers

---

## [Gem install native extention errors and permissions](https://www.ruby-forum.com/t/gem-install-native-extention-errors-and-permissions/259310)

<div class="topic-metadata">

**Author:** [@davenz](https://www.ruby-forum.com/u/davenz)\
**Replies:** 0\
**Last updated:** [April 21, 2020, 9:45am UTC](https://www.ruby-forum.com/t/gem-install-native-extention-errors-and-permissions/259310 "2020-04-21T09:45:46Z")

</div>

Ubuntu 18.04.4 LTS 64 bit \*\*\*\*\* installed via system repository \*\*\*\*\* ruby 2.5.1p57 (2018-03-29 revision 63029) \[x86\_64-linux-gnu\] rails 2.5.0 bundle 1.16.1 No ruby enviroment contoller (like RVM) installed Number …

---

## [How to Edit a Gemfile](https://www.ruby-forum.com/t/how-to-edit-a-gemfile/259096)

<div class="topic-metadata">

**Author:** [@mawi5173](https://www.ruby-forum.com/u/mawi5173)\
**Replies:** 1\
**Last updated:** [April 2, 2020, 3:19am UTC](https://www.ruby-forum.com/t/how-to-edit-a-gemfile/259096 "2020-04-02T03:19:02Z")

</div>

Hi all, new struggling coder here! I’m following through Michael Hartl’s rails tutorial and I am doing it on Windows 10. I also followed Scott Hanselman’s set up of running rails through Ubuntu and Linux on Windows Termi…

---

## [Why doesn't my query deliver singular results?](https://www.ruby-forum.com/t/why-doesnt-my-query-deliver-singular-results/258902)

<div class="topic-metadata">

**Author:** [@von\_spotz](https://www.ruby-forum.com/u/von_spotz)\
**Replies:** 3\
**Last updated:** [March 27, 2020, 5:13am UTC](https://www.ruby-forum.com/t/why-doesnt-my-query-deliver-singular-results/258902 "2020-03-27T05:13:24Z")

</div>

Hello, I have following query with group by and having plus count. It should return only those entries specified in the group by clause as they have count. @articles = Article.joins(:taggings).where(taggings: { tag\_id:…

---

## [Error is not skipped by next in a each loop](https://www.ruby-forum.com/t/error-is-not-skipped-by-next-in-a-each-loop/258905)

<div class="topic-metadata">

**Author:** [@groschat](https://www.ruby-forum.com/u/groschat)\
**Replies:** 0\
**Last updated:** [March 17, 2020, 12:06pm UTC](https://www.ruby-forum.com/t/error-is-not-skipped-by-next-in-a-each-loop/258905 "2020-03-17T12:06:09Z")

</div>

Hello everyone, \*edit: ‘at’ =@ (the ‘at sign’ is somewhat understood as mentioning an user). Formatting also returns an error. I am sorry for that. I don’t know how to solve this I am new to ruby. I have a ‘for each’ l…

---

## [How do I use an instance of another Controller as service object?](https://www.ruby-forum.com/t/how-do-i-use-an-instance-of-another-controller-as-service-object/258901)

<div class="topic-metadata">

**Author:** [@von\_spotz](https://www.ruby-forum.com/u/von_spotz)\
**Replies:** 0\
**Last updated:** [March 17, 2020, 7:41am UTC](https://www.ruby-forum.com/t/how-do-i-use-an-instance-of-another-controller-as-service-object/258901 "2020-03-17T07:41:18Z")

</div>

Hello ! How do I use an instance of another controller as service Object? Personally, my problem-case is that I have a ActsAsPolymorphicTree Concern with a polymorphic join table, such that db\_records of different type…

---

## [Cerco sviluppatore Ruby on Rails per collaborazione a distanza](https://www.ruby-forum.com/t/cerco-sviluppatore-ruby-on-rails-per-collaborazione-a-distanza/258447)

<div class="topic-metadata">

**Author:** [@Lucio658](https://www.ruby-forum.com/u/Lucio658)\
**Replies:** 0\
**Last updated:** [March 12, 2020, 3:31pm UTC](https://www.ruby-forum.com/t/cerco-sviluppatore-ruby-on-rails-per-collaborazione-a-distanza/258447 "2020-03-12T15:31:49Z")

</div>

Ciao a tutti. Cerco sviluppatore Ruby on Rails per collaborazione a distanza. Per maggiori informazioni scrivetemi all’indirizzo info@ipomea.it grazie

---

## [Newbie question trying to understand collection\_check\_boxes method](https://www.ruby-forum.com/t/newbie-question-trying-to-understand-collection-check-boxes-method/257979)

<div class="topic-metadata">

**Author:** [@arthas86](https://www.ruby-forum.com/u/arthas86)\
**Replies:** 0\
**Last updated:** [March 9, 2020, 12:55pm UTC](https://www.ruby-forum.com/t/newbie-question-trying-to-understand-collection-check-boxes-method/257979 "2020-03-09T12:55:59Z")

</div>

Hi, I am new to Rails, and I am trying to create checkboxes in a view. I came across this method: https://apidock.com/rails/v4.0.2/ActionView/Helpers/FormOptionsHelper/collection\_check\_boxes What I am trying to underst…

---

## [Compiling/ Pod init Error](https://www.ruby-forum.com/t/compiling-pod-init-error/257813)

<div class="topic-metadata">

**Author:** [@Drama008](https://www.ruby-forum.com/u/Drama008)\
**Replies:** 0\
**Last updated:** [March 7, 2020, 9:02pm UTC](https://www.ruby-forum.com/t/compiling-pod-init-error/257813 "2020-03-07T21:02:06Z")

</div>

cannot load such file – concurrent/executor/cached\_thread\_pool ( LoadError ) Any help would be greatly appreciated

---

## [Help with csv converter](https://www.ruby-forum.com/t/help-with-csv-converter/257729)

<div class="topic-metadata">

**Author:** [@nigeloconnor](https://www.ruby-forum.com/u/nigeloconnor)\
**Replies:** 0\
**Last updated:** [March 6, 2020, 5:03pm UTC](https://www.ruby-forum.com/t/help-with-csv-converter/257729 "2020-03-06T17:03:17Z")

</div>

Hi, I have the following and I am getting NoMethodError: undefined method \`arity’ for nil:NilClass - Can someone explain what is happening? CSV::Converters\[:RemoveChars\] = lambda do |field| field.gsub(/^\[^a-z0-9\\…

---

## [Running Nokogiri in a simple task - getting data and storing it in sqlite db](https://www.ruby-forum.com/t/running-nokogiri-in-a-simple-task-getting-data-and-storing-it-in-sqlite-db/256942)

<div class="topic-metadata">

**Author:** [@say\_hello](https://www.ruby-forum.com/u/say_hello)\
**Replies:** 0\
**Last updated:** [March 1, 2020, 1:26pm UTC](https://www.ruby-forum.com/t/running-nokogiri-in-a-simple-task-getting-data-and-storing-it-in-sqlite-db/256942 "2020-03-01T13:26:10Z")

</div>

hello dear Ruby-experts, i fairly new to imple\_html\_dom usage and methods. I know a little the parser, i want to gather some information from this site: is this possible to get the content - of let us say 10 or 20 l…

---

## [I am try to install docker bitnami redmine agile pulgin](https://www.ruby-forum.com/t/i-am-try-to-install-docker-bitnami-redmine-agile-pulgin/254766)

<div class="topic-metadata">

**Author:** [@ram.c](https://www.ruby-forum.com/u/ram.c)\
**Replies:** 5\
**Last updated:** [February 14, 2020, 4:52am UTC](https://www.ruby-forum.com/t/i-am-try-to-install-docker-bitnami-redmine-agile-pulgin/254766 "2020-02-14T04:52:05Z")

</div>

cmss@red:~/docker-data/bitnami/redmine/plugins/redmine\_agile$ rake redmine:plugins:migrate RAILS\_ENV=production --trace rake aborted! Don't know how to build task 'redmine:plugins:migrate' (See the list of available task…

---

## [How to connect to oracle with jruby](https://www.ruby-forum.com/t/how-to-connect-to-oracle-with-jruby/254444)

<div class="topic-metadata">

**Author:** [@HansS](https://www.ruby-forum.com/u/HansS)\
**Replies:** 1\
**Last updated:** [February 12, 2020, 7:49am UTC](https://www.ruby-forum.com/t/how-to-connect-to-oracle-with-jruby/254444 "2020-02-12T07:49:40Z")

</div>

Hi, My version of jruby is: jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 25.212-b04 on 1.8.0\_212-b04 +indy +jit \[linux-x86\_64\] I want to connect to an Oracle database. A jdbc gem is installed. D…

---

## [Need to insert row in particular line in text file in ruby](https://www.ruby-forum.com/t/need-to-insert-row-in-particular-line-in-text-file-in-ruby/253328)

<div class="topic-metadata">

**Author:** [@rravi](https://www.ruby-forum.com/u/rravi)\
**Replies:** 4\
**Last updated:** [February 6, 2020, 5:33pm UTC](https://www.ruby-forum.com/t/need-to-insert-row-in-particular-line-in-text-file-in-ruby/253328 "2020-02-06T17:33:30Z")

</div>

hi All, i have one text file with 100’s of lines and my scenarios is i need to insert a new line at row number 36 in text file… please help me how to do as am new to ruby script.

---

## [How can I access data in this instance variable?](https://www.ruby-forum.com/t/how-can-i-access-data-in-this-instance-variable/253962)

<div class="topic-metadata">

**Author:** [@chopps](https://www.ruby-forum.com/u/chopps)\
**Replies:** 0\
**Last updated:** [February 4, 2020, 11:35am UTC](https://www.ruby-forum.com/t/how-can-i-access-data-in-this-instance-variable/253962 "2020-02-04T11:35:10Z")

</div>

I am trying to access the classroom name however when I try hurry.hurry\_jobs.job.classroom.name I get this undefined method job’ for #Class:0x387a2c8\` This is the debug log of the collection data entry from a query. …

---

## [Ruby C extension returns report\_on\_exception is true](https://www.ruby-forum.com/t/ruby-c-extension-returns-report-on-exception-is-true/253682)

<div class="topic-metadata">

**Author:** [@akhilravuri1](https://www.ruby-forum.com/u/akhilravuri1)\
**Replies:** 3\
**Last updated:** [February 4, 2020, 5:47am UTC](https://www.ruby-forum.com/t/ruby-c-extension-returns-report-on-exception-is-true/253682 "2020-02-04T05:47:39Z")

</div>

I was trying to import server\_info api in the ibm\_db extension. It worked well in windows but in Linux, it returns tread sleep error. #\<Thread:0x000055c9febc5ca0 sleep\> terminated with exception (report\_on\_exception is …

---

## [Ruby SHOES - Transation SQL GET/PUT](https://www.ruby-forum.com/t/ruby-shoes-transation-sql-get-put/253678)

<div class="topic-metadata">

**Author:** [@dandrade](https://www.ruby-forum.com/u/dandrade)\
**Replies:** 0\
**Last updated:** [January 28, 2020, 6:46pm UTC](https://www.ruby-forum.com/t/ruby-shoes-transation-sql-get-put/253678 "2020-01-28T18:46:24Z")

</div>

CREATE TABLE products ( id INT NOT NULL AUTO\_INCREMENT, name\_prod VARCHAR(40), cod\_prod INT(14), PRIMARY KEY (id) ); ----------- READ to put in drop\_list --------------- resultSet=client.query(“SELECT name\_prod F…

---

## [USRP N210\_Activation RX and TX](https://www.ruby-forum.com/t/usrp-n210-activation-rx-and-tx/253671)

<div class="topic-metadata">

**Author:** [@Ivancica](https://www.ruby-forum.com/u/Ivancica)\
**Replies:** 0\
**Last updated:** [January 28, 2020, 1:06pm UTC](https://www.ruby-forum.com/t/usrp-n210-activation-rx-and-tx/253671 "2020-01-28T13:06:05Z")

</div>

Hi, Plese can you help me. I have USRP N210, my software is Matlab R2016a and OS Windows. My question is: Can I use one USRP N210 (one device) as transmitter and receiver on the way that is RF1 is transmitter and RF2 …

---

## [Array find\_index](https://www.ruby-forum.com/t/array-find-index/253666)

<div class="topic-metadata">

**Author:** [@ceitsol](https://www.ruby-forum.com/u/ceitsol)\
**Replies:** 0\
**Last updated:** [January 27, 2020, 8:59pm UTC](https://www.ruby-forum.com/t/array-find-index/253666 "2020-01-27T20:59:51Z")

</div>

select code,name,gender from employee the result of above query is obtained in an array ar\_employee=con.exec "select code,name,gender from employee I want to find a specific code in the array by using array.find\_index…

---

## [Ruby extconf.rb is creating a wrong make file](https://www.ruby-forum.com/t/ruby-extconf-rb-is-creating-a-wrong-make-file/253616)

<div class="topic-metadata">

**Author:** [@akhilravuri1](https://www.ruby-forum.com/u/akhilravuri1)\
**Replies:** 0\
**Last updated:** [January 21, 2020, 7:36am UTC](https://www.ruby-forum.com/t/ruby-extconf-rb-is-creating-a-wrong-make-file/253616 "2020-01-21T07:36:42Z")

</div>

I have been trying to build ibm\_db driver on my own with ruby 2.6.5 + devkit When I run ruby extconf.rb it creates make file but make file contains path related to unix but I am running it on windows. ERROR:- $ mingw3…

---

## [Help GNU Radio with 2 instalations of UHD](https://www.ruby-forum.com/t/help-gnu-radio-with-2-instalations-of-uhd/253576)

<div class="topic-metadata">

**Author:** [@THeDolaken](https://www.ruby-forum.com/u/THeDolaken)\
**Replies:** 1\
**Last updated:** [January 14, 2020, 9:21pm UTC](https://www.ruby-forum.com/t/help-gnu-radio-with-2-instalations-of-uhd/253576 "2020-01-14T21:21:48Z")

</div>

Hello everyone, I installed firstly GNU radio on Ubuntu 18.04 with a help of Synaptic Package Manager, i checked all boxes which i needed: gnuradio, gnuradio-dev, gnuradio-doc, ggrx-sdr a gr-rds. Everything was alright…

[Previous page](https://www.ruby-forum.com/c/uncategorized/1.md?page=5)

[Next page](https://www.ruby-forum.com/c/uncategorized/1.md?page=7)
