Questions tagged as 'ruby'

1
answer

Error during cocoon implementation

I have a model Describete that is associated with a user. In the same view of describe there should be a 'add more' button, but it does not appear. Having the following error:    undefined local variable or method 'form' if I chang...
asked by 16.12.2018 / 20:19
2
answers

Because using double or single quotes in Ruby on Rails changes the result that is printed?

Because changing the syntax of the code using double or single quotes changes the result that is printed? <puts"hola \n nueva " puts'hola \n nueva '>     
asked by 04.01.2019 / 06:06
1
answer

FATAL: database "db / development.sqlite3" does not exist [closed]

I can not find the solution to this problem     
asked by 21.08.2018 / 00:59
3
answers

How to generate the config / secrets.yml file in Rails?

It turns out that I just started a project in RoR and my project does not contain the file secrets.yml, I would like to know how to generate one or make the original appear that should be hidden somewhere.     
asked by 18.08.2018 / 16:31
1
answer

How to change the project that comes by default in the image One Click app for Ruby On Rails DigitalOcean

I need to deploy my own application on a DigitalOcean server, I have a droplet with the One Click app image for Ruby On Rails and it has an empty running application called rails_project by default. I need to know how to change the configurat...
asked by 12.07.2018 / 06:23
2
answers

Generate image url

I'm uploading images to my rails project (I'm not using gems), I upload them to public/temp up to here all right, the problem I have is that I need to generate a public url of the image so that the photo can be accessed for another servic...
asked by 30.07.2018 / 18:48
1
answer

Execute a block depending on timestamps in Ruby

I want a block of code to be executed, with the following condition: In a variable I have saved a timestamp, ex. @tiempo date: 2018-06-11 18:04:25 -0500, and the current time is # => 2018-06-13 18:04:25 -0500 If the diffe...
asked by 14.06.2018 / 01:34
1
answer

/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require': can not load such file - bundler (LoadError)

Hi, I'm trying to create an app with Ruby on Rails but when I create a project it gives me the following error: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require': cannot load such file -- bundler (LoadError) from /usr/lib...
asked by 25.05.2018 / 16:33
1
answer

Problem with Ruby algorithm

I have a list of numbers generated by a division: #encoding:UTF-8 a = Array(1 .. 100) a.each do |number| b = number / 2.0 puts "El resultado de #{number} entre 2 es: #{b}" end And this is the result, just as I wanted: El resultado d...
asked by 15.03.2018 / 04:03
1
answer

Bundler could not find compatible versions for gem "typhoeus" v. 1.3.0

I enter my Gemfile: gem 'khipu-api-client', '2.7.1' gem 'typhoeus', '1.3.0' However, it generates the following error when using the command: bundle install Bundler could not find compatible versions for gem "typhoeus": In Gemfile: t...
asked by 01.03.2018 / 13:25