ruby tag

542 questions


1 answers
31 views
0
Error comparing variables: initialized constant BUY (NameError)

When json takes a value, substitutes a variable, and compares it with an uninitialized constant, an error occurs.I would like to display yes when a==BUY.Thank you for your cooperation.require net/http...

2 years ago

4 answers
38 views
0
Is there a name for a method that destroys an argument, like a destructive method when the caller changes state?

obj.fn(x)What is the name of the function that changes the value of the argument x before and after calling?Ruby is obj.reverse!The one whose state of obj changes in is called a destructive method.It'...

2 years ago

1 answers
36 views
0
Understanding Ruby Modularization

We are solving the problem of modularizing ruby.If you have trouble solving the error statement and you know the solution, please let me know.when run in rubymain.rbThe error description is as follows...

2 years ago

1 answers
36 views
0
"Cannot load database configuration" error when executing rails and force termination

Rails and other Rails~-related commands, such as rails show the Cannot load database configuration:(NoMethodError) undefined method[]'for nil:NilClassI want to be able to boot up properly because it s...

2 years ago

1 answers
117 views
0
"database configuration does not specify adapter" when using mysql in sinatra

Let me ask you a question.I am having trouble understanding the error below.environmental framework:sinatraworking with:ActiverecordDB:mysql[database.yml]development: adapter —mysql2 database —sinatra...

2 years ago

1 answers
108 views
0
Rake routes are no longer available

I'm a beginner at ruby.Rails development no longer works rake routes.I don't understand even if I google it, so let me ask you a question.>Macbook:PetsHuggy UserName$rake routesrake aborted!cannot ...

2 years ago

1 answers
81 views
0
When I press submit button in form in capybara, the data in the database disappears for some reason.

If you test it on your browser, it will succeed, but if you test it on capybara, it will fail.If you submit it on the edit screen as shown below, update it.def update # When the post button is pressed...


2 answers
40 views
0
Is it good/bad to have multiple URLs for the same action in Rails 4?

For example, suppose you have UsersController and you set it in config/routes.rb as follows: I want root 'users#index'#root to be a list of usersresources —usersThen the routing configuration should b...

2 years ago

1 answers
37 views
0
Compilation error in C language (pointer usage is not good...?)

Always I am indebted.Ruby was able to output as expected, but it doesn't work out as expected in C language.Created in Ruby and C language.I am attaching it as follows, so please check it.------------...

2 years ago

1 answers
128 views
0
RSpec x Capybara Modal Is Displayed but Will Not Find

I'd like to test the modal display when I press the user delete button The following error will be displayed:it Can delete other users do visit user_path(I18n.locale, other_user) page.dismiss_confirm(...

2 years ago
« - 33 - »

© 2024 OneMinuteCode. All rights reserved.