# Uncategorized

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

[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:** 8

---

## [Making dynamic action](https://www.ruby-forum.com/t/making-dynamic-action/253509)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 2\
**Last updated:** [December 20, 2019, 5:32am UTC](https://www.ruby-forum.com/t/making-dynamic-action/253509 "2019-12-20T05:32:29Z")

</div>

i want make dynamic action , how can i assign method name into a variable? require ‘http’ endpoint\_url=“https://reqres.in/api/users?page=2” endpoint\_headers= {“Content-Type” =\> “application/json”} #making dynamic act…

---

## [Error installing gem pg on Mac with Postgress.app](https://www.ruby-forum.com/t/error-installing-gem-pg-on-mac-with-postgress-app/253498)

<div class="topic-metadata">

**Author:** [@Forbin](https://www.ruby-forum.com/u/Forbin)\
**Replies:** 0\
**Last updated:** [December 18, 2019, 4:20am UTC](https://www.ruby-forum.com/t/error-installing-gem-pg-on-mac-with-postgress-app/253498 "2019-12-18T04:20:17Z")

</div>

The pg gem will not install. Getting: ERROR: Error installing pg: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/pg-1.1.4/ext /System/Library/Frameworks/Ruby.fram…

---

## [Issue has been solved](https://www.ruby-forum.com/t/issue-has-been-solved/253465)

<div class="topic-metadata">

**Author:** [@nmp153](https://www.ruby-forum.com/u/nmp153)\
**Replies:** 0\
**Last updated:** [December 12, 2019, 6:40pm UTC](https://www.ruby-forum.com/t/issue-has-been-solved/253465 "2019-12-12T18:40:15Z")

</div>

I am trying to validate this array of string entered in by the user to be less than or equal to 4 digits

---

## [Add validation to prevent out of range for ActiveRecord::Type::Integer with limit 4](https://www.ruby-forum.com/t/add-validation-to-prevent-out-of-range-for-activerecord-integer-with-limit-4/253417)

<div class="topic-metadata">

**Author:** [@nmp153](https://www.ruby-forum.com/u/nmp153)\
**Replies:** 0\
**Last updated:** [December 5, 2019, 2:00pm UTC](https://www.ruby-forum.com/t/add-validation-to-prevent-out-of-range-for-activerecord-integer-with-limit-4/253417 "2019-12-05T14:00:50Z")

</div>

I am running into out of range for ActiveRecord::Type::Integer with limit 4 error when typing a number over 10 digits. I want to add a validation to prevent this error from popping up. validates :duration, numericality:…

---

## [How to set environment variable in env.rb to be use in the ruby code](https://www.ruby-forum.com/t/how-to-set-environment-variable-in-env-rb-to-be-use-in-the-ruby-code/253389)

<div class="topic-metadata">

**Author:** [@LayMui](https://www.ruby-forum.com/u/LayMui)\
**Replies:** 0\
**Last updated:** [November 30, 2019, 3:19am UTC](https://www.ruby-forum.com/t/how-to-set-environment-variable-in-env-rb-to-be-use-in-the-ruby-code/253389 "2019-11-30T03:19:30Z")

</div>

Hi I like to set the server\_url to point to different url path based on different env such as dev, qa server\_url: dev: https://iconverse-dev.xx.io/iconverse-admin/#/ qa: https://iconverse-qa.xx.io/iconverse-admin/#/ …

---

## [Array comparison](https://www.ruby-forum.com/t/array-comparison/253367)

<div class="topic-metadata">

**Author:** [@Kdobson93](https://www.ruby-forum.com/u/Kdobson93)\
**Replies:** 1\
**Last updated:** [November 21, 2019, 9:36am UTC](https://www.ruby-forum.com/t/array-comparison/253367 "2019-11-21T09:36:32Z")

</div>

Hi I have a handful of arrays, and I want to see if any of the values in any of the arrays, appear in any of the other arrays, is there a clean way to do this or would it be a case of comparing them one at a time?

---

## [Range to integer](https://www.ruby-forum.com/t/range-to-integer/253362)

<div class="topic-metadata">

**Author:** [@Kdobson93](https://www.ruby-forum.com/u/Kdobson93)\
**Replies:** 1\
**Last updated:** [November 20, 2019, 7:51am UTC](https://www.ruby-forum.com/t/range-to-integer/253362 "2019-11-20T07:51:48Z")

</div>

Hi So I’m creating a game using RPG maker XP, which uses RGSS. But I am using a text editor to make sure the a method works before pasting it into the game. I have created a method that loops through an array and when …

---

## [Array subtraction](https://www.ruby-forum.com/t/array-subtraction/253351)

<div class="topic-metadata">

**Author:** [@Kdobson93](https://www.ruby-forum.com/u/Kdobson93)\
**Replies:** 3\
**Last updated:** [November 19, 2019, 3:38am UTC](https://www.ruby-forum.com/t/array-subtraction/253351 "2019-11-19T03:38:09Z")

</div>

Hi everyone, been scratching my head on this one for ages! test1=\[1,6,4,11,13\] test2=\[13,6\] test3=test1-test2 I want test3 to remove the elements in test2 from test1, resulting in \[1,4,11\] but instead I am getting \[4…

---

## [Question on rake.db:create](https://www.ruby-forum.com/t/question-on-rake-db-create/253353)

<div class="topic-metadata">

**Author:** [@ais](https://www.ruby-forum.com/u/ais)\
**Replies:** 0\
**Last updated:** [November 18, 2019, 8:09pm UTC](https://www.ruby-forum.com/t/question-on-rake-db-create/253353 "2019-11-18T20:09:24Z")

</div>

Hi When running rake db:create, I receive NoMethodError: undefined method \`strip\_heredoc’ for #\<String:0x0000 how could this be prevented and how should the quickest workaround be? Best

---

## [Pls i need help, I am stuck and frustrated](https://www.ruby-forum.com/t/pls-i-need-help-i-am-stuck-and-frustrated/253269)

<div class="topic-metadata">

**Author:** [@Flynaijageh](https://www.ruby-forum.com/u/Flynaijageh)\
**Replies:** 7\
**Last updated:** [November 6, 2019, 11:19pm UTC](https://www.ruby-forum.com/t/pls-i-need-help-i-am-stuck-and-frustrated/253269 "2019-11-06T23:19:21Z")

</div>

Pls can someone help me out, I am trying to use a times loop to get 5 student’s (first and last name) and then store the user’s input i.e first and last name in an array but each time I do this, only the last item gets …

---

## [Can't write unknown attribute \`recipe\_type\_id\`](https://www.ruby-forum.com/t/cant-write-unknown-attribute-recipe-type-id/253240)

<div class="topic-metadata">

**Author:** [@mikuzuhara](https://www.ruby-forum.com/u/mikuzuhara)\
**Replies:** 0\
**Last updated:** [October 24, 2019, 1:05am UTC](https://www.ruby-forum.com/t/cant-write-unknown-attribute-recipe-type-id/253240 "2019-10-24T01:05:35Z")

</div>

When downloading the repository on the machine, I gave the following commands: $ rails generate migration RemoveRecipe\_ \*typeToRecipe recipe\_\* type:string $ rails db:migrate RAILS \*ENV=test\* \*$ rails generate model re…

---

## [Update the label text after button click and executing command proc](https://www.ruby-forum.com/t/update-the-label-text-after-button-click-and-executing-command-proc/253224)

<div class="topic-metadata">

**Author:** [@dootsquare](https://www.ruby-forum.com/u/dootsquare)\
**Replies:** 0\
**Last updated:** [October 20, 2019, 9:41am UTC](https://www.ruby-forum.com/t/update-the-label-text-after-button-click-and-executing-command-proc/253224 "2019-10-20T09:41:06Z")

</div>

I am trying to update the label text after pressing a button. So far I’ve encountered this problem NameError: unknown option 'codelabel' for #\<Tk::Button:0x00000000050146b8 @path=".w00003"\> (deleted widget?). I can’t se…

---

## [DateTime madness](https://www.ruby-forum.com/t/datetime-madness/253154)

<div class="topic-metadata">

**Author:** [@ikarius](https://www.ruby-forum.com/u/ikarius)\
**Replies:** 7\
**Last updated:** [October 18, 2019, 2:24pm UTC](https://www.ruby-forum.com/t/datetime-madness/253154 "2019-10-18T14:24:20Z")

</div>

I found it remarkably difficult to construct a TimeDate object from a date and timezone at the beginning of day, which would correctly handle DST. The challenge I ran into was that you don’t know if a calendar day is on…

---

## [How to add "\\n" in a string](https://www.ruby-forum.com/t/how-to-add-n-in-a-string/253015)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 4\
**Last updated:** [September 21, 2019, 8:46am UTC](https://www.ruby-forum.com/t/how-to-add-n-in-a-string/253015 "2019-09-21T08:46:38Z")

</div>

str = “sunil kumar” expected output: sunil\\nkumar

---

## [Storing instance variable to date function](https://www.ruby-forum.com/t/storing-instance-variable-to-date-function/252939)

<div class="topic-metadata">

**Author:** [@geethak](https://www.ruby-forum.com/u/geethak)\
**Replies:** 1\
**Last updated:** [August 31, 2019, 8:33pm UTC](https://www.ruby-forum.com/t/storing-instance-variable-to-date-function/252939 "2019-08-31T20:33:30Z")

</div>

Continuing the discussion from Struggling with Date fields - select\_month and select\_year: Hello everyone , I collect month from drop down and I stored that selected month in an instance variable in controller , if I w…

---

## [Params from web form](https://www.ruby-forum.com/t/params-from-web-form/252740)

<div class="topic-metadata">

**Author:** [@jon2jay](https://www.ruby-forum.com/u/jon2jay)\
**Replies:** 2\
**Last updated:** [July 19, 2019, 6:12pm UTC](https://www.ruby-forum.com/t/params-from-web-form/252740 "2019-07-19T18:12:46Z")

</div>

Hello everyone, need some quick assistance. Having difficulty grabbing these two variables and including them in a post url. You can see ruby pulls the POST variables as expected (testing using p params or params.to\_s) …

---

## [Built a simple e-commerce site with Ruby on Rails and RefineryCMS!](https://www.ruby-forum.com/t/built-a-simple-e-commerce-site-with-ruby-on-rails-and-refinerycms/251737)

<div class="topic-metadata">

**Author:** [@NatePDThompson](https://www.ruby-forum.com/u/NatePDThompson)\
**Replies:** 2\
**Last updated:** [July 6, 2019, 4:46pm UTC](https://www.ruby-forum.com/t/built-a-simple-e-commerce-site-with-ruby-on-rails-and-refinerycms/251737 "2019-07-06T16:46:16Z")

</div>

Would love this community’s thoughts! We built a humble ecom site using: Ruby on Rails + RefineryCMS + Snipcart Please let us know what you think of the article and the structure of the demo!

---

## [ERROR linked file /home/deploy/shared/.env does not exist](https://www.ruby-forum.com/t/error-linked-file-home-deploy-shared-env-does-not-exist/252664)

<div class="topic-metadata">

**Author:** [@989zak](https://www.ruby-forum.com/u/989zak)\
**Replies:** 0\
**Last updated:** [July 5, 2019, 3:52pm UTC](https://www.ruby-forum.com/t/error-linked-file-home-deploy-shared-env-does-not-exist/252664 "2019-07-05T15:52:29Z")

</div>

Everytime I try to cap production deploy, I keep getting the following error: I don’t know how to create an .env file nor do I have it either. Can somebody help me? 00:02 deploy:check:linked\_files ERROR linked file /h…

---

## [How to use ARGV\*,How do i implement command line argument in it](https://www.ruby-forum.com/t/how-to-use-argv-how-do-i-implement-command-line-argument-in-it/252650)

<div class="topic-metadata">

**Author:** [@ndy](https://www.ruby-forum.com/u/ndy)\
**Replies:** 1\
**Last updated:** [July 4, 2019, 7:29am UTC](https://www.ruby-forum.com/t/how-to-use-argv-how-do-i-implement-command-line-argument-in-it/252650 "2019-07-04T07:29:51Z")

</div>

\<\<-doc Modify the sum of times method for any number of time values passed to this method. Eg: (“11:23:07”,“22:53:45”,“0:23:23”,“23:45:56”) -\> “2 day & 10:26:11” (“0:45:34”,“0:15:58”) -\> 01:01:32 ; (“11:23:07”,“22:53:…

---

## [I want output like this dd/mm/yyyy](https://www.ruby-forum.com/t/i-want-output-like-this-dd-mm-yyyy/252540)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 7\
**Last updated:** [June 19, 2019, 1:58pm UTC](https://www.ruby-forum.com/t/i-want-output-like-this-dd-mm-yyyy/252540 "2019-06-19T13:58:56Z")

</div>

d = Date.parse(“10/12/1995”) my expected output is exactly like this only dd/mm/yyyy

---

## [Need to do only decryption for encrypted input value](https://www.ruby-forum.com/t/need-to-do-only-decryption-for-encrypted-input-value/252568)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 0\
**Last updated:** [June 12, 2019, 6:00am UTC](https://www.ruby-forum.com/t/need-to-do-only-decryption-for-encrypted-input-value/252568 "2019-06-12T06:00:45Z")

</div>

data = “suni” i have encrypted input val = ?\`???f?@??c? so i want to decrypt the val expected output = suni key is = Sunilskn@123456789

---

## [Getting error like in \`final': bad decrypt (OpenSSL::Cipher::CipherError) while decrypting array of objects](https://www.ruby-forum.com/t/getting-error-like-in-final-bad-decrypt-openssl-ciphererror-while-decrypting-array-of-objects/252557)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 2\
**Last updated:** [June 11, 2019, 12:39pm UTC](https://www.ruby-forum.com/t/getting-error-like-in-final-bad-decrypt-openssl-ciphererror-while-decrypting-array-of-objects/252557 "2019-06-11T12:39:58Z")

</div>

require ‘openssl’ require ‘base64’ require ‘hex\_string’ require ‘pry’ $data = \[“suni”,“1”,“nagoore”,"@gmail.com"\] $enc = \[\] cipher = OpenSSL::Cipher::AES.new(128, :CBC) cipher.encrypt key = cipher.random\_key iv …

---

## [New to ruby and rails](https://www.ruby-forum.com/t/new-to-ruby-and-rails/252558)

<div class="topic-metadata">

**Author:** [@apuff](https://www.ruby-forum.com/u/apuff)\
**Replies:** 0\
**Last updated:** [June 11, 2019, 7:52am UTC](https://www.ruby-forum.com/t/new-to-ruby-and-rails/252558 "2019-06-11T07:52:38Z")

</div>

Could not find gem ‘sqlite3 x64-mingw32’ in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems. \[so i run bundle install and then i get this:\] An error occurred while installing …

---

## [Redarding date i want to identify the formate of input date ex: input: 10-12-1995 output: dd-mm-yyyy](https://www.ruby-forum.com/t/redarding-date-i-want-to-identify-the-formate-of-input-date-ex-input-10-12-1995-output-dd-mm-yyyy/252556)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 6\
**Last updated:** [June 11, 2019, 5:36am UTC](https://www.ruby-forum.com/t/redarding-date-i-want-to-identify-the-formate-of-input-date-ex-input-10-12-1995-output-dd-mm-yyyy/252556 "2019-06-11T05:36:22Z")

</div>

if my inputs is 10/12/2019 my expected outputs is dd/mm/yyyy if my inputs is 2019/12/10 my expected outputs is yyyy/mm/dd if my inputs is 12/10/2019 my expected outputs is mm/dd/yyyy like above i want outputs i want …

---

## [301\*  Moved A browser redirects](https://www.ruby-forum.com/t/301-moved-a-browser-redirects/248855)

<div class="topic-metadata">

**Author:** [@mamrez47](https://www.ruby-forum.com/u/mamrez47)\
**Replies:** 1\
**Last updated:** [May 9, 2019, 7:57am UTC](https://www.ruby-forum.com/t/301-moved-a-browser-redirects/248855 "2019-05-09T07:57:37Z")

</div>

Sep 5, 2018 - The vinok.ir HyperText Transfer Protocol ( HTTP ) 301 Moved Permanently redirect status response code indicates that the resource requested has been definitively moved to the URL given by the Location h…

---

## [Apache web log analyzer](https://www.ruby-forum.com/t/apache-web-log-analyzer/252384)

<div class="topic-metadata">

**Author:** [@rolujavier94](https://www.ruby-forum.com/u/rolujavier94)\
**Replies:** 1\
**Last updated:** [May 8, 2019, 5:59am UTC](https://www.ruby-forum.com/t/apache-web-log-analyzer/252384 "2019-05-08T05:59:19Z")

</div>

I have been working in this code for a course lab, I supposed to read a log from an Apache server, however, every time I try to run the code I get this error message rb:96: syntax error, unexpected end, expecting end-of…

---

## [$150k Sr. Software Engineer (Ruby on Rails)](https://www.ruby-forum.com/t/150k-sr-software-engineer-ruby-on-rails/252359)

<div class="topic-metadata">

**Author:** [@FelipeTorano](https://www.ruby-forum.com/u/FelipeTorano)\
**Replies:** 0\
**Last updated:** [May 2, 2019, 5:38pm UTC](https://www.ruby-forum.com/t/150k-sr-software-engineer-ruby-on-rails/252359 "2019-05-02T17:38:35Z")

</div>

Sr. Software Engineer (Ruby on Rails) @ FilmFreeway $100k - $160k 0.05% - 1.0% (Equity) Las Vegas, NV Full Time or C2C NO Remote JD: https://newton.ai/jd/ff\_sse Please send me an invitation on Linkedin if you wish t…

---

## [A rewrite of TkDocs' Ruby example programs in production-code style](https://www.ruby-forum.com/t/a-rewrite-of-tkdocs-ruby-example-programs-in-production-code-style/252130)

<div class="topic-metadata">

**Author:** [@markdblackwell](https://www.ruby-forum.com/u/markdblackwell)\
**Replies:** 0\
**Last updated:** [March 21, 2019, 5:07pm UTC](https://www.ruby-forum.com/t/a-rewrite-of-tkdocs-ruby-example-programs-in-production-code-style/252130 "2019-03-21T17:07:40Z")

</div>

The Tk graphical user interface (GUI; part of Tcl/Tk) toolkit enjoys a fine tutorial introduction on Mark Roseman’s TkDocs website (introduced here). For my own learning purposes, I have rewritten its Ruby example progra…

---

## [WBFM Transmiter](https://www.ruby-forum.com/t/wbfm-transmiter/252060)

<div class="topic-metadata">

**Author:** [@Fekadie](https://www.ruby-forum.com/u/Fekadie)\
**Replies:** 0\
**Last updated:** [March 12, 2019, 7:47am UTC](https://www.ruby-forum.com/t/wbfm-transmiter/252060 "2019-03-12T07:47:06Z")

</div>

what to give value for max deviation ? what is the advantage? and also tua?

---

## [How can I add "Compress to 7zip" in RMB menu in Dolphin?](https://www.ruby-forum.com/t/how-can-i-add-compress-to-7zip-in-rmb-menu-in-dolphin/251911)

<div class="topic-metadata">

**Author:** [@sherylle1989](https://www.ruby-forum.com/u/sherylle1989)\
**Replies:** 0\
**Last updated:** [February 15, 2019, 9:36pm UTC](https://www.ruby-forum.com/t/how-can-i-add-compress-to-7zip-in-rmb-menu-in-dolphin/251911 "2019-02-15T21:36:51Z")

</div>

I see there is RAR, TAR.GZ and ZIP and Compress to… where I can also choose other formats, 7-zip included. What is the way to add 7-zip directly to the right mouse click menu? When I go to ‘Download New Services’ is Se…

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

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