ruby tag

542 questions


1 answers
140 views
0
Ruby / VS Code / garbled characters

Ruby will be garbled if you use VS Code and output the following code.code:address={name: Takahashi, furigana: Takahashi, postal: 1234567}Output: {:name=>\u9AD8\u6A4B,:furigana=>\u30BF\u30AB\u30...

2 years ago

1 answers
101 views
0
How do I pass javascript variables to the controller?

I would like to create the following process.1. I don't know how to deliver javascript variables to the controller, so could you tell me how to do it and how to code it?Ruby 2.6.3Rails 6.0.3Thank you ...


1 answers
27 views
0
I would like to use transactions when importing csv files in rails.(If an error occurs, cancel all line changes and return to the original screen to display the error.)

Creating web applications in rails.Therefore, we are currently implementing the csv file capture function.I was able to import csv, but I would like to use transactions to import csv files.(If an erro...

2 years ago

2 answers
29 views
0
In Ruby, a program that performs division without using the division operator '/'

I'm a beginner in programming.At Ruby, A storage area x stores 100 and a storage area y stores 3.Solution for x yy without the division operator / Find and store in storage z.I can't solve the problem...

2 years ago

1 answers
26 views
0
@ Regarding the presence or absence of

(*I am a beginner who has been studying programming for about a month.)Thank you for looking at the question.While studying a Ruby introductory book, I have some questions.The Ruby version is ruby 2.6...

2 years ago

1 answers
32 views
0
I want to sort the results of combining multiple tables in Rails using Geocoder Gem

I would like to combine Area Model, Shop Model, and Account Model to get the results of sorting in order close to the location specified in Geocoder Gem.I would like to use each to list what I have ac...

2 years ago

1 answers
83 views
0
I can't retrieve the contents of the associated database.

Ruby (Ruby on Rails) is creating a restaurant word-of-mouth site like a food log while referring to tutorials.I set categories for each area, but I failed to pull them from the controller on the searc...

2 years ago

3 answers
28 views
0
How long does Math.sqrt(n).to_i return the correct value for n value?

I'm using Ruby 2.2.1.when n=1,2,…,Math.sqrt(n).to_i returns the correct value(i.e., the value of Math.sqrt(m).to_i is [ mm] for all m from 1 to n.)How much is n?By the way When n = 4503599761588224, M...

2 years ago

1 answers
32 views
0
I want to make my own contributions to GitHub.

Prerequisites/What you want to achieveI am currently making my own contributions to GitHub.↓Contributions part of GitHub↓ Self-made Problems you are havingI'd like to change the variable defined in Ra...


1 answers
68 views
0
The mount of the Rails engine does not work and the initialized constant (NameError) appears.

We would like to introduce the following gem.https://github.com/fnando/coupons as per README instructionsAfter adding to Gemfile, $bundle installEdit config/routes.rbI did, but uninitialized constant ...

« - 45 - »

© 2024 OneMinuteCode. All rights reserved.