Questions tagged [ruby-2.4]

For issues relating to development in Ruby, version 2.4. If your question applies to Ruby in general, use the tag [ruby].

73 questions
0
votes
1 answer

Selenium::WebDriver::Error::WebDriverError: Unable to find chromedriver. Please download the server from

using ruby 2.4.0p0 , Rails 5.2.3 Got error while running system test cases for rails application: Error: SubscriptionsTest#test_visit_susbcription: Selenium::WebDriver::Error::WebDriverError: Unable to find chromedriver. Please download the server…
vidur punj
  • 5,019
  • 4
  • 46
  • 65
0
votes
1 answer

ActionView::Template::Error: Can't resolve image into URL: undefined method `[]' for nil:NilClass

using: Ruby 2.4.0p0 Rails 5.2.3 while running my test cases: having and error: My testcase is like: require 'test_helper' class SubscriptionsControllerTest < ActionDispatch::IntegrationTest test "Can reach to index " do get…
vidur punj
  • 5,019
  • 4
  • 46
  • 65
0
votes
1 answer

Mysql2::Error: Column 'encrypted_password' cannot be null

Rails 5, ruby 2.4.0 Error: rails while running rails test Mysql2::Error: Column 'encrypted_password' cannot be null My test: utilities_controller_test.rb require 'test_helper' class UsersControllerTest < ActionDispatch::IntegrationTest test "Has…
vidur punj
  • 5,019
  • 4
  • 46
  • 65
0
votes
0 answers

Rails includes with has_many through giving avoid eger loading n+1 by bullet gem

My Models are like: class ThreeDModel < ApplicationRecord has_many :three_d_model_animations has_many :animations, through: :three_d_model_animations has_many :three_d_model_images, dependent: :destroy has_many :three_d_garments has_one…
vidur punj
  • 5,019
  • 4
  • 46
  • 65
0
votes
1 answer

Convert Json hash in CSV to ruby hash

In CSV file, I have the following line : data1;data2;{"key1":"value1","key2":"value2"} I can parse it and get my ruby hash like this : require 'csv' line = 'data1;data2;{"key1":"value1","key2":"value2"}' csv = CSV.parse_line(line, col_sep: ";",…
Florent L.
  • 403
  • 4
  • 10
0
votes
1 answer

What to do When Unicorn Type Error Happened in Ruby 2.4

I upgrade ruby from 2.1 to 2.4(ruby24, ruby24-devel), bundler(version: 1.17.3), nokogiri(version: 1.6.8), rails(version: 4.0.1), unicorn(version: 5.0.1), therubyracer(version: 0.12.3). There are failures as follows: > INFO -- : Refreshing Gem list >…
yfqin
  • 41
  • 3
0
votes
2 answers

Conditional passing of parameters when creating an instance of a class

I'm refactoring my code and I want to have some logic passed to a parameter when creating an instance of a class. To best describe the problem, I will share some code. I have this method that takes in an object as an argument. def…
kevinsamoei
  • 73
  • 2
  • 8
0
votes
2 answers

undefined method each for nil class in nokigiri use

i am trying to fetch all links on the given link but it is giving me an error undefined method `each' for nil:NilClass require 'nokogiri' def find_links(link) page = Nokogiri::HTML(open(link)) link_size = page.css('li') (0..link_size.length).each do…
Wasey Raza
  • 230
  • 5
  • 16
0
votes
0 answers

Ruby side-by-side error (sxstrace)

Apologies in advance for the messy question. I have a problem after installing Ruby 2.4.4-x64 with MYSYS2 from the site. Running ruby -v from the command prompt gives this error: The application has failed to start because its side-by-side…
buzzysin
  • 311
  • 3
  • 12
0
votes
1 answer

How to require google api client

I am using google-api-client gem for creating events in Google Calendar. I found docs from google: https://developers.google.com/calendar/quickstart/ruby So, when I installed gem, after command rails console I tried require libs: require…
0
votes
1 answer

No route matches [POST] "/portfollios/new"

Hey Guys I am getting issue, No Route Matches, though I have created both new as well as create method. portfollios_controller.rb class PortfolliosController < ApplicationController def index @portfolio_items = Portfollio.all end def new …
DisplayName
  • 222
  • 1
  • 2
  • 11
0
votes
1 answer

Sidekiq async tasks are done synchronously

I have two Sidekiq workers: # app/workers/client_worker.rb class ClientWorker include Sidekiq::Worker def perform(*args) puts "client started\n" end end and # app/workers/server_worker.rb class ServerWorker include Sidekiq::Worker …
ubugnu
  • 1,004
  • 2
  • 15
  • 30
0
votes
1 answer

error when starting rails console

I get the error below when I try to start my rails console, /usr/lib/ruby/vendor_ruby/rails/railtie/configuration.rb:95:in `method_missing': undefined method `load_defaults' for #
Ali
  • 21
  • 5
0
votes
2 answers

How to I specify that a match should occur if a character does not belong to an array?

I'm having trouble specifying "the next character should not be from this group of characters" in my regex. I have TOKENS = [":", ".", "'"] "01:39\t" =~ /\b0\d[#{Regexp.union(TOKENS)}]\d\d^#{Regexp.union(TOKENS)}/ #=> nil Since "\t" is not part…
Dave
  • 15,639
  • 133
  • 442
  • 830
0
votes
1 answer

Devise error messages not displaying after incorporating Bootstrap

I realize this question, or a similar one, has been asked before, but none of the proposed solutions that I've found have worked for me. So I'm building a website using the Devise authentication gem, and recently tried to incorporate Bootstrap for…