Questions tagged [ruby-2.3]

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

Ruby 2.3.0 was released on on 25 Dec 2015. It is the first stable release of the Ruby 2.3 series.

It introduces some new features (like the safe navigation operator and frozen string literals) and various performance improvements. A description of new features in Ruby 2.3 is at https://www.ruby-lang.org/en/news/2015/12/25/ruby-2-3-0-released/.

This tag is intended for questions specific to version 2.3 of Ruby.

164 questions
0
votes
1 answer

How to fix broken UTF-8 string in ruby 2

I have as an input string tat thinks is UTF-8 but is not and need to fix it. The code is in ruby 2 so iconv is no more and encode or force_encode are not working as intended: [5] pry(main)> a='zg\u0142oszeniem' => "zg\\u0142oszeniem" [6] pry(main)>…
pkoltermann
  • 113
  • 1
  • 6
0
votes
1 answer

setup resque with mongoid

I have got my resque setup process complete, tested successfully with a simple job. It is recommended to close ActiveRecord connection in the pool setup rake task and establish the connection on after_prefork to avoid stale connections before…
Subash
  • 3,128
  • 6
  • 30
  • 44
0
votes
1 answer

Aptitude has unmet dependencies and encounters a segmentation fault when performing the recommended fix. How do I fix it?

I am on Ubuntu 17.10, freshly installed and tried to installed Ruby using apt-get install ruby-full. It failed to install and now aptitude says The following packages have unmet dependencies: ri: Depends: ruby2.3-doc but it is not installed E:…
Thomas Paulin
  • 515
  • 1
  • 6
  • 12
0
votes
2 answers

How to detect a BasicObject Proxy?

I am using a BasicObject Proxy and I need to detect whether I have passed an actual object OR such a proxy. Problem is that methods such as is_a? or class are not defined module ControllerProxyable extend ActiveSupport::Concern included do …
Cyril Duchon-Doris
  • 12,964
  • 9
  • 77
  • 164
0
votes
1 answer

is there any way to redirect (like redirect_to) the url from worker, modules in rails?

Hi I am processing some background jobs and I need to redirect the URL from the module or directly from the worker but as per my knowledge, there is only one method i.e redirect_to but it's not available in module and worker as per the rails MVC…
Ravindra Yadav
  • 619
  • 2
  • 6
  • 15
0
votes
2 answers

Rails validations, mixing messages and full_messages

For the most part, I find that Rails default error messages for most of the built-in validators work fine for me. However, I also have a few validations on some models where the default "{{attribute}} {{message}}" full_message format just doesn't…
xanderflood
  • 826
  • 2
  • 12
  • 22
0
votes
1 answer

Capybara Webkit installation

Hey all this is my first project in ruby and I am trying to install capybara using the the instructions here: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit I keep running into this error constantly.…
g0rd
  • 143
  • 1
  • 9
0
votes
1 answer

Upgrading ruby to 2.3.4 with rails 3.0.5

I am trying to upgrade my rails 3.0.5 application with ruby 2.3.4. Originally it was ruby 1.9.3. I was able to fix most things by updating the gems. However, i m stuck on this one problem where when creating new active record objects, the time does…
0
votes
1 answer

Rails send_file/send_data sends pdf file without content

I am generating a pdf file using WickedPdf.new.pdf_from_string. File itself generates fine, when saved in disk and opened. But when same file sent via send_data, browser downloads file with pages as per generated file but without any text/content in…
0
votes
2 answers

Error running Rails Server - unable to load gem 'sass-rails'

I'm new to Rails and trying to load and configure it for the first time. I'm following the instructions on http://installrails.com/steps/rails_for_linux_and_other for installing on Linux (I'm actually using an Ubuntu Virtual Machine that is…
0
votes
1 answer

How can load Controller Specific CSS and JS in Ruby On rails

In Rails project i am using Rails 5 version, Has i know controller specific css and js should load automatically without precompile the code in development mode.But if Precompile assets file than all controller specific files are loading. …
0
votes
1 answer

Custom exception in Ruby 2.3 and 2.4

I would like to rescue some code with a custom class in Ruby 2.3 and 2.4. But unlike with the previous versions (such as 2.2 which was working great), I have some troubles. Here an example: Given this class: class CustomError <…
0
votes
0 answers

Using Instagram to fetch media .Shows error "uninitialized constant Instagram"

1.Installed gem "Instagram" 2.config/initializers/ instagram.rb Instagram.configure do |config| config.client_id = "XXXXXXXXXXXXXXXXXXXXXXXXXX" config.client_secret = "XXXXXXXXXXXXXXXXXXXXXXX" config.access_token =…
Cliff_Cleet
  • 201
  • 1
  • 3
  • 14
0
votes
2 answers

Call property programmatically in Ruby

I have a Ruby project where I programmatically get the names of keys in a hash I need to access. I can access the fields I need in the following way: current_content = entry.fields[property_name.to_sym] However, it seems that some content can only…
skaz
  • 21,962
  • 20
  • 69
  • 98
0
votes
1 answer

How to implement a dual list box control in rails 4

I want to implement a dual list box in a form using rails 4 that gets the column names from another table I have googled for some examples and so far i have tried the example below but with no success. I just need a simple way to implement a dual…