# Development

**URL:** https://www.ruby-forum.com/c/ruby/ruby-dev/14.md

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

---

## [Reading mail messages, finding plaintext, suffering Mime-parts](https://www.ruby-forum.com/t/reading-mail-messages-finding-plaintext-suffering-mime-parts/266429)

<div class="topic-metadata">

**Author:** [@bleak\_gravel](https://www.ruby-forum.com/u/bleak_gravel)\
**Replies:** 2\
**Last updated:** [September 3, 2024, 5:49am UTC](https://www.ruby-forum.com/t/reading-mail-messages-finding-plaintext-suffering-mime-parts/266429 "2024-09-03T05:49:17Z")

</div>

How does anybody do this? 🡸 That is my question. My idea to find data in the bodies of mail addressed to a specific account (for a purpose common to the expeditor and the recipient) makes me learn stuff that I did not w…

---

## [Ruby and class constants](https://www.ruby-forum.com/t/ruby-and-class-constants/260910)

<div class="topic-metadata">

**Author:** [@luciotbc](https://www.ruby-forum.com/u/luciotbc)\
**Replies:** 3\
**Last updated:** [August 29, 2024, 12:52pm UTC](https://www.ruby-forum.com/t/ruby-and-class-constants/260910 "2024-08-29T12:52:29Z")

</div>

I have a confusion to access class constants, for example: class GoogleApi API\_ENDPOINT = 'https://www.google.com/' end I can’t understand what’s the difference between GoogleApi.API\_ENDPOINT and GoogleApi::API\_ENDPO…

---

## [How can I add an instance variable to an object after the object was initialized?](https://www.ruby-forum.com/t/how-can-i-add-an-instance-variable-to-an-object-after-the-object-was-initialized/262019)

<div class="topic-metadata">

**Author:** [@ped](https://www.ruby-forum.com/u/ped)\
**Replies:** 2\
**Last updated:** [August 29, 2024, 1:00pm UTC](https://www.ruby-forum.com/t/how-can-i-add-an-instance-variable-to-an-object-after-the-object-was-initialized/262019 "2024-08-29T13:00:53Z")

</div>

I have an instance of a class with data and would like to extend it with some instance variables. Here is what I know: class A attr\_accessor :id attr\_accessor :description def initialize(id, description = nil) …

---

## [Change hash key based on hash value](https://www.ruby-forum.com/t/change-hash-key-based-on-hash-value/261568)

<div class="topic-metadata">

**Author:** [@sunilkumarnagoore](https://www.ruby-forum.com/u/sunilkumarnagoore)\
**Replies:** 2\
**Last updated:** [August 29, 2024, 10:50am UTC](https://www.ruby-forum.com/t/change-hash-key-based-on-hash-value/261568 "2024-08-29T10:50:48Z")

</div>

hash = { “price”: “419.5”, “pricelevelname”: “STOCKING DEALER” } Expected Result { “price\_STOCKING DEALER”: “419.5”, “pricelevelname”: “STOCKING DEALER”, } how to achieve this

---

## [How use bash command with quotes in ruby script?](https://www.ruby-forum.com/t/how-use-bash-command-with-quotes-in-ruby-script/264424)

<div class="topic-metadata">

**Author:** [@flo](https://www.ruby-forum.com/u/flo)\
**Replies:** 2\
**Last updated:** [August 29, 2024, 10:42am UTC](https://www.ruby-forum.com/t/how-use-bash-command-with-quotes-in-ruby-script/264424 "2024-08-29T10:42:40Z")

</div>

Hi I need to use this command on a ruby script : iwconfig 2\>/dev/null | grep -o “^\\w\*” \> cards.txt How can i use it in a ruby script ?

---

## [Why do "not" and "!" have different precedences?](https://www.ruby-forum.com/t/why-do-not-and-have-different-precedences/263941)

<div class="topic-metadata">

**Author:** [@zacrad](https://www.ruby-forum.com/u/zacrad)\
**Replies:** 3\
**Last updated:** [August 29, 2024, 10:36am UTC](https://www.ruby-forum.com/t/why-do-not-and-have-different-precedences/263941 "2024-08-29T10:36:15Z")

</div>

A big part of ruby’s design as a language is to increase readability and enhance the experience for the developers, so why does the more readable “not” have lower precedence than “!”, causing weird errors sometimes?

---

## [\[gem “Mail”\] Cannot compose boundary for Mail::Body.split!](https://www.ruby-forum.com/t/gem-mail-cannot-compose-boundary-for-mail-body-split/264994)

<div class="topic-metadata">

**Author:** [@bleak\_gravel](https://www.ruby-forum.com/u/bleak_gravel)\
**Replies:** 1\
**Last updated:** [August 24, 2024, 4:29am UTC](https://www.ruby-forum.com/t/gem-mail-cannot-compose-boundary-for-mail-body-split/264994 "2024-08-24T04:29:23Z")

</div>

Good morning My first post in this forum concerns mail 2.8.1 with Ruby 3.1.2p20 I appear to be unable to split a mail-body into parts. From what I read in body.rb from the Mail gem, a Regexp is created from my String-a…

---

## [Compiling Ruby on Windows VS 2022](https://www.ruby-forum.com/t/compiling-ruby-on-windows-vs-2022/264927)

<div class="topic-metadata">

**Author:** [@UnfortunateDev](https://www.ruby-forum.com/u/UnfortunateDev)\
**Replies:** 0\
**Last updated:** [July 22, 2024, 5:52am UTC](https://www.ruby-forum.com/t/compiling-ruby-on-windows-vs-2022/264927 "2024-07-22T05:52:00Z")

</div>

I’m trying to compile Ruby on a Windows Machine using Visual Studio 2022. All the topics here seems to for compiling Ruby was for ver 1.x of Ruby and for VS 2005 or older. Do we have a more recent guide to compile Ruby, …

---

## [React With Ruby On Rails?](https://www.ruby-forum.com/t/react-with-ruby-on-rails/264892)

<div class="topic-metadata">

**Author:** [@Jiten](https://www.ruby-forum.com/u/Jiten)\
**Replies:** 0\
**Last updated:** [July 7, 2024, 6:03pm UTC](https://www.ruby-forum.com/t/react-with-ruby-on-rails/264892 "2024-07-07T18:03:13Z")

</div>

Powerful, modern web applications. Ruby on Rails is a spectacular framework to create solid backends, and work with databases and business logic. It is globally acclaimed JavaScript library that can be used for construct…

---

## [Ionic 7 - Get different version of Ruby installed on macOS Ventura](https://www.ruby-forum.com/t/ionic-7-get-different-version-of-ruby-installed-on-macos-ventura/264880)

<div class="topic-metadata">

**Author:** [@simsar78](https://www.ruby-forum.com/u/simsar78)\
**Replies:** 0\
**Last updated:** [July 3, 2024, 2:55pm UTC](https://www.ruby-forum.com/t/ionic-7-get-different-version-of-ruby-installed-on-macos-ventura/264880 "2024-07-03T14:55:58Z")

</div>

Hello, i have an app with Ionic 7 and Angular. Initially it always worked. At a certain point it started giving me the following error when I launch this command: ionic capacitor sync iOS. Error below: \[capacitor\] …

---

## [Ruby: An Intelligent Operating System](https://www.ruby-forum.com/t/ruby-an-intelligent-operating-system/264865)

<div class="topic-metadata">

**Author:** [@Dcypher](https://www.ruby-forum.com/u/Dcypher)\
**Replies:** 0\
**Last updated:** [June 24, 2024, 3:36am UTC](https://www.ruby-forum.com/t/ruby-an-intelligent-operating-system/264865 "2024-06-24T03:36:33Z")

</div>

The Ruby OS whitepaper is available to view at www dot rubyos dot org, please go through it and pick it to pieces, any critiques would be appreciated ! Thanks in Advance, Dcypher Nocili

---

## [After upgrading to ruby v 3.2.3 rb\_scan\_args() skips argument value](https://www.ruby-forum.com/t/after-upgrading-to-ruby-v-3-2-3-rb-scan-args-skips-argument-value/264678)

<div class="topic-metadata">

**Author:** [@praveenrocket](https://www.ruby-forum.com/u/praveenrocket)\
**Replies:** 2\
**Last updated:** [March 13, 2024, 7:19am UTC](https://www.ruby-forum.com/t/after-upgrading-to-ruby-v-3-2-3-rb-scan-args-skips-argument-value/264678 "2024-03-13T07:19:10Z")

</div>

Hi, Note: I am not an expert at ruby. I am working on ibm\_db gem, its an adapter developed using ruby C extension, which helps ruby & rails applications to connect to DB2 database. Under github source is at ibmdb/ruby…

---

## [Convert Ruby variable to js variable](https://www.ruby-forum.com/t/convert-ruby-variable-to-js-variable/264592)

<div class="topic-metadata">

**Author:** [@xlorate](https://www.ruby-forum.com/u/xlorate)\
**Replies:** 2\
**Last updated:** [February 1, 2024, 2:45pm UTC](https://www.ruby-forum.com/t/convert-ruby-variable-to-js-variable/264592 "2024-02-01T14:45:01Z")

</div>

I have a global Ruby variable and need to convert it in js so I can insert it into a tag. The global variable $modelPath = Sketchup.active\_model.path The Html tag \<p id = 'file\_dir'\>\</p\> script function get\_path()…

---

## [Uninitialized constant- when trying to calculate](https://www.ruby-forum.com/t/uninitialized-constant-when-trying-to-calculate/264552)

<div class="topic-metadata">

**Author:** [@xlorate](https://www.ruby-forum.com/u/xlorate)\
**Replies:** 2\
**Last updated:** [January 22, 2024, 11:03am UTC](https://www.ruby-forum.com/t/uninitialized-constant-when-trying-to-calculate/264552 "2024-01-22T11:03:05Z")

</div>

I am trying to use three modules, First\_Module.rb module Raw\_Data A = 10.0 B = 20.0 end Second\_Module.rb $LOAD\_PATH \<\< '.' require "First\_Module.rb" module Do\_Calc x= Raw\_Data::A y= Raw\_Data::B x = x \* 12.0 …

---

## [Ruby 3.3 introduces range overlap? method](https://www.ruby-forum.com/t/ruby-3-3-introduces-range-overlap-method/264377)

<div class="topic-metadata">

**Author:** [@alkesh26](https://www.ruby-forum.com/u/alkesh26)\
**Replies:** 1\
**Last updated:** [October 22, 2023, 9:55pm UTC](https://www.ruby-forum.com/t/ruby-3-3-introduces-range-overlap-method/264377 "2023-10-22T21:55:00Z")

</div>

---

## [Ubuntu 2.7.8 install](https://www.ruby-forum.com/t/ubuntu-2-7-8-install/264369)

<div class="topic-metadata">

**Author:** [@jason9364](https://www.ruby-forum.com/u/jason9364)\
**Replies:** 2\
**Last updated:** [October 19, 2023, 9:22am UTC](https://www.ruby-forum.com/t/ubuntu-2-7-8-install/264369 "2023-10-19T09:22:36Z")

</div>

Hi. I need to install 2.7.8 on a virgin 22.04 machine. I must admit I’m not anything approaching an expert at this! I can get 2.7.1 from rbenv but can’t find any package manager that will install 2.7.8. I could downl…

---

## [Segmentation fault when generating md5](https://www.ruby-forum.com/t/segmentation-fault-when-generating-md5/264281)

<div class="topic-metadata">

**Author:** [@mbajur](https://www.ruby-forum.com/u/mbajur)\
**Replies:** 1\
**Last updated:** [September 14, 2023, 7:38pm UTC](https://www.ruby-forum.com/t/segmentation-fault-when-generating-md5/264281 "2023-09-14T19:38:57Z")

</div>

Hey there! In one of my rails models, i’m generating a md5 hash from couple of strings in order to check if anything in given record changed or not. My code looks as follows: def md5 content\_data = Templates::Ser…

---

## [Avatar Phi Rho / Knowledge Graphs / Ontotext, Neo4j etc](https://www.ruby-forum.com/t/avatar-phi-rho-knowledge-graphs-ontotext-neo4j-etc/264194)

<div class="topic-metadata">

**Author:** [@philip\_rhoades](https://www.ruby-forum.com/u/philip_rhoades)\
**Replies:** 2\
**Last updated:** [August 18, 2023, 9:22am UTC](https://www.ruby-forum.com/t/avatar-phi-rho-knowledge-graphs-ontotext-neo4j-etc/264194 "2023-08-18T09:22:54Z")

</div>

People, I have been experimenting with ChatBots for about 10 years and, of course, more recently, been playing around with ChatGPT etc. After talking to someone from the UK (I am in Australia) who had done a lot of wor…

---

## [Where is RBS(trait)-info that can statically typecheck the elements of a Complex](https://www.ruby-forum.com/t/where-is-rbs-trait-info-that-can-statically-typecheck-the-elements-of-a-complex/264136)

<div class="topic-metadata">

**Author:** [@jumnichi.kose](https://www.ruby-forum.com/u/jumnichi.kose)\
**Replies:** 2\
**Last updated:** [July 25, 2023, 11:44am UTC](https://www.ruby-forum.com/t/where-is-rbs-trait-info-that-can-statically-typecheck-the-elements-of-a-complex/264136 "2023-07-25T11:44:44Z")

</div>

I am makeing a MyNumeric class to use as an element of type Complex. As we found out in the previous post, the implementation of the unary operator ‘-@’ and the coerce() method was leaked, causing unexpected execution r…

---

## [Complex\<(MyNumeric Value a, MyNumeric negative Value b) displayed (a - (negative Value b)\*i)](https://www.ruby-forum.com/t/complex-mynumeric-value-a-mynumeric-negative-value-b-displayed-a-negative-value-b-i/264132)

<div class="topic-metadata">

**Author:** [@jumnichi.kose](https://www.ruby-forum.com/u/jumnichi.kose)\
**Replies:** 2\
**Last updated:** [July 24, 2023, 1:53am UTC](https://www.ruby-forum.com/t/complex-mynumeric-value-a-mynumeric-negative-value-b-displayed-a-negative-value-b-i/264132 "2023-07-24T01:53:44Z")

</div>

Please tell me how to inspect () and to\_s () the negative imaginary part correctly in the class for making it an element of Complex. –(1) Example that worked as expected; p "Complex\<Rational\<Integer\>,BigDecaimal.negati…

---

## [Complex\<MyNumeric,MyNumeric\> replaced Complex\<MyNumeric,Float\>; How to use coerce()](https://www.ruby-forum.com/t/complex-mynumeric-mynumeric-replaced-complex-mynumeric-float-how-to-use-coerce/264131)

<div class="topic-metadata">

**Author:** [@jumnichi.kose](https://www.ruby-forum.com/u/jumnichi.kose)\
**Replies:** 3\
**Last updated:** [July 23, 2023, 1:36pm UTC](https://www.ruby-forum.com/t/complex-mynumeric-mynumeric-replaced-complex-mynumeric-float-how-to-use-coerce/264131 "2023-07-23T13:36:30Z")

</div>

A MyNumeric type object that inherits Numeric can be specified in the Ruby Complex class constructor. However, when I specified a negative value of MyNumber type for the imaginary part, the imaginary part was replaced w…

---

## [Help for a total noob trying to debug for the first time](https://www.ruby-forum.com/t/help-for-a-total-noob-trying-to-debug-for-the-first-time/263751)

<div class="topic-metadata">

**Author:** [@spydox](https://www.ruby-forum.com/u/spydox)\
**Replies:** 10\
**Last updated:** [April 5, 2023, 6:59pm UTC](https://www.ruby-forum.com/t/help-for-a-total-noob-trying-to-debug-for-the-first-time/263751 "2023-04-05T18:59:52Z")

</div>

I’m a one-day-old Ruby programmer, with 30 years of Perl programming. I have a MSCS (from FAU go Owls!) and I’ve been a computer professional since my US ARMY COBOL days in the mid 70s. I need a bootstrap load for Ruby…

---

## [To Overwrite ''false" Value](https://www.ruby-forum.com/t/to-overwrite-false-value/263108)

<div class="topic-metadata">

**Author:** [@dineshrhozet24086](https://www.ruby-forum.com/u/dineshrhozet24086)\
**Replies:** 1\
**Last updated:** [April 2, 2023, 9:22pm UTC](https://www.ruby-forum.com/t/to-overwrite-false-value/263108 "2023-04-02T21:22:46Z")

</div>

Hi Run below ruby code to overwrite false value in xml to true but still I am getting same false value ,overwrite of value is not happen… \<n1:File\> \<n1:FileName\>44979\_008\_V01\_SIGNED.mxf\</n1:FileName\> \<n1:Chec…

---

## [Enable XHTML in Webrick](https://www.ruby-forum.com/t/enable-xhtml-in-webrick/263571)

<div class="topic-metadata">

**Author:** [@NU2rb](https://www.ruby-forum.com/u/NU2rb)\
**Replies:** 1\
**Last updated:** [April 2, 2023, 9:20pm UTC](https://www.ruby-forum.com/t/enable-xhtml-in-webrick/263571 "2023-04-02T21:20:45Z")

</div>

I’m having trouble having WEBrick return XHTML to the browser - the browser renders the identical file with an ‘html’ extension perfectly but won’t render xhtml and its associated CSS stylesheet. I’ve tried two things: …

---

## [Some gems for some useful functions I've made](https://www.ruby-forum.com/t/some-gems-for-some-useful-functions-ive-made/263694)

<div class="topic-metadata">

**Author:** [@jgomo3](https://www.ruby-forum.com/u/jgomo3)\
**Replies:** 6\
**Last updated:** [March 5, 2023, 7:01pm UTC](https://www.ruby-forum.com/t/some-gems-for-some-useful-functions-ive-made/263694 "2023-03-05T19:01:59Z")

</div>

I’ve made some gems for functions I’ve used in private projects that I found somehow useful. They are small, focusing on a few functionalities. Funny enough, I found myself using only a couple of those functions. The …

---

## [Wich version of Sinatra to ruby 3.0.2](https://www.ruby-forum.com/t/wich-version-of-sinatra-to-ruby-3-0-2/263665)

<div class="topic-metadata">

**Author:** [@Banlock](https://www.ruby-forum.com/u/Banlock)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 10:43am UTC](https://www.ruby-forum.com/t/wich-version-of-sinatra-to-ruby-3-0-2/263665 "2023-02-17T10:43:12Z")

</div>

Quelle version de Sinatra faut il pour ruby 3.0.2

---

## [Cloudsmith SaaS artifact repository now has support for Ruby upstream caching and proxying](https://www.ruby-forum.com/t/cloudsmith-saas-artifact-repository-now-has-support-for-ruby-upstream-caching-and-proxying/263182)

<div class="topic-metadata">

**Author:** [@ccarey](https://www.ruby-forum.com/u/ccarey)\
**Replies:** 0\
**Last updated:** [August 22, 2022, 10:28am UTC](https://www.ruby-forum.com/t/cloudsmith-saas-artifact-repository-now-has-support-for-ruby-upstream-caching-and-proxying/263182 "2022-08-22T10:28:11Z")

</div>

Cloudsmith is a universal, cloud-native artifact repository with support for over 28 package formats including Ruby. Ruby is the latest package format on Cloudsmith to support upstream caching and proxying to repositorie…

---

## [Date Format mm/dd/yyyy](https://www.ruby-forum.com/t/date-format-mm-dd-yyyy/262631)

<div class="topic-metadata">

**Author:** [@rubenube](https://www.ruby-forum.com/u/rubenube)\
**Replies:** 1\
**Last updated:** [April 23, 2022, 10:01am UTC](https://www.ruby-forum.com/t/date-format-mm-dd-yyyy/262631 "2022-04-23T10:01:50Z")

</div>

Hello, we have a Ruby script and are having problems with the date format. The required format is mm/dd/yyyy. The result is mm dd yyyy. The slashes are missing. Here are the 2 lines in the script: FORMAT(bhdb\_bill\_dt1,…

---

## [Closing a $global in a Binding - out of the question?](https://www.ruby-forum.com/t/closing-a-global-in-a-binding-out-of-the-question/262512)

<div class="topic-metadata">

**Author:** [@dji1](https://www.ruby-forum.com/u/dji1)\
**Replies:** 4\
**Last updated:** [February 25, 2022, 12:56am UTC](https://www.ruby-forum.com/t/closing-a-global-in-a-binding-out-of-the-question/262512 "2022-02-25T00:56:13Z")

</div>

Hi… I’ll try to be brief. I have a programming problem that I would like to solve by closing a global variable into a Binding. I’ve wracked my brain for other ways to do this, but it seems this is the only way. I have a …

---

## [Racc Parser help](https://www.ruby-forum.com/t/racc-parser-help/262484)

<div class="topic-metadata">

**Author:** [@ArkansasCoder](https://www.ruby-forum.com/u/ArkansasCoder)\
**Replies:** 0\
**Last updated:** [February 4, 2022, 9:03pm UTC](https://www.ruby-forum.com/t/racc-parser-help/262484 "2022-02-04T21:03:49Z")

</div>

I am building my first simple parser but am running into a problem. I have a racc scanner that is working and outputs a tokens array of arrays of token type and name. For example: \[\[:UNIT, 'one'\], \[:TEN, 'twenty'\]\]. The…

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