ruby tag

542 questions


1 answers
34 views
0
Ruby script for file conversion displays error 'getbit': undefined method'

I'm a programmer and not the developer of the Ruby script for questions.When I try to use the Ruby script for file format conversion, I get an error and stop halfway.I'm trying to convert dictionary d...

2 years ago

1 answers
43 views
0
After performing fragment caching once a day, I want to return the result of caching the first user access.

I am developing it at Ruby on Rails.Currently, there is a page on the View side that aggregates and draws statistics.Drawing takes nearly two minutes because it is not stored in DB and has a wide vari...

2 years ago

2 answers
123 views
0
I want Ruby to retrieve the string in the markdown check box from the string.

As the title says, I would like to implement something like getting only the string (-[]-[x]) in the check box from the Ruby markdown text and returning the array of the string. Could you please let m...

2 years ago

2 answers
34 views
0
What happens if I write this FizzBuzz code in Ruby in Python?

I usually use Ruby. I started studying Python, but I was having a hard time, so please let me know.class FizzBuzz def self.fizz?(i) i>0&(i%3) == 0 end def self.buzz?(i) i>0&(i%5) == 0 en...

2 years ago

1 answers
37 views
0
I want to make a hash nest.

class<<self def category_sort order(small_category_id: asc, id: asc) .group_by {|w|w.small_category.name} end endThe above results have the following hash:small_category1=>[data1,data2,data...

2 years ago

2 answers
64 views
0
Errno::EADDRNOTAVAIL when you hit api from Rails on Docker

I want to get a response to book information by tapping Google books api from Rails' Book modelweb_1|Errno::EADDRNOTAVAIL (Failed to open TCP connection to:80 (Address not available-connect(2) for nil...


4 answers
37 views
0
Understanding Why Each Ruby on Rails Action Has the Same Variable Name

For example, Why don't I change the variable name for each action?@a, @b, @c, @d use the same variable as @messagePlease tell me about the benefits.class MessagesController<ApplicationController de...

2 years ago

1 answers
84 views
0
I want to do something about loading timeout on Selenium Webdriver.

The language is ruby, selenium version 2.2 and the browser is Firefox 31.4.After I click the login button on Facebook, I go to the members page. The member page has a very high probability that the lo...

2 years ago

1 answers
32 views
0
Where do you want Ruby on Rails to place the files that you want to run periodically?

Currently, I am thinking of creating a file called app/controller/crawl.rb and running it regularly on crontab, but is this correct?Or are there any rules on where to put the files to be executed regu...

2 years ago

1 answers
42 views
0
Migration in rails does not add foreign keys

Migrating with rails does not show any signs of a foreign key being created in schema.rb.* AssumptionsWe are currently creating Twitter-like applications with rails, implementing the ability for users...

2 years ago
« - 40 - »

© 2024 OneMinuteCode. All rights reserved.