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
1
vote
2 answers

Split the array by anything that isn't a letter

I have a class that will check a users environment to find out if they have python installed, the classes purpose is to check if the user has multiple versions of python installed and to not default to three: class CheckForPythonicVariables class…
User9123
  • 515
  • 2
  • 6
  • 14
1
vote
2 answers

Creating somewhat readable words in Ruby

I'm trying to create somewhat readable words in ruby containing upper case, lowercase, numbers, and a special character, something like: FlAshmnger!2 Derfing$23 To create a random string in ruby you can do something like this: lower =…
User9123
  • 515
  • 2
  • 6
  • 14
1
vote
1 answer

Ruby how to delegate module function of Namespace to Namespace::Base inner class

I was confronted against choosing either #1 : class Abstract end class Abstract::Foo < Abstract end class Abstract::Bar < Abstract end versus #2 : module Abstract class Base end class Foo < Base end class Bar < Base end end I ended up…
Cyril Duchon-Doris
  • 12,964
  • 9
  • 77
  • 164
1
vote
1 answer

Payola worker fails with 'relation "payola_subscriptions" does not exist'

UPDATE I've posted a 30$ bounty for whoever fixes this. I'm using the Checkout button and posting the result to payola/subscribe/PLAN_CLASS/PLAN_ID.json This is my initializers/payola.rb Payola.configure do |config| config.background_worker =…
Alfredo Re
  • 122
  • 7
1
vote
1 answer

Broken User Registration Form in Ruby on Rails

I'm having an issue with my user registration form in Ruby on Rails. I had it working before simply with just a username, email, and password. However when I tried to add fields for first name, last name, and ZIP code, it stopped inserting any data…
crackedact0r
  • 59
  • 1
  • 7
1
vote
2 answers

How to handle multiple exceptions in a Transaction with Ruby on Rails for importing a text file

My ruby environment is: Ruby 2.3.1 and Rails 5.0.0.1. I'm trying to import a text file for import a lot of purchases items. Example of purchase file: data.txt Customer\tDescription\tUnit Price\tQuantity\tAddress\tSupply company\n Athos…
1
vote
3 answers

rbenv not able to install ruby 2.2.5 and 2.3.1

I run brew update and brew upgrade rbenv ruby-build. FYI: I updated xcode to version 8.1 yesterday. I checked available versions, rbenv install -l. Then I tried to install ruby2.2.5 by rbenv install 2.2.5, then I get the following errors. I tried…
shin
  • 31,901
  • 69
  • 184
  • 271
1
vote
2 answers

Fail to install MySQL2 gem on Mac

I'm trying to install mysql2 gem for rails applications but it gives me following error while running sudo gem install mysql2 ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. current directory:…
Muhammad Ateeq Azam
  • 1,009
  • 1
  • 12
  • 26
1
vote
1 answer

Can't start rails server - "Failed to watch" error - Bash - Ubuntu - Windows 10

The problem is that the server will not start. I have set up the following: Windows 10 build 1607 (Anniversary edition) Windows subsystem for Linux GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu) Ubuntu 14.04.5 LTS \n \l Rails ver…
NewMike
  • 21
  • 3
1
vote
1 answer

Does it make sense to test with intermediate Ruby versions?

If a project passes the tests in Ruby 2.0.0-p648 and Ruby 2.3.1, does it make sense to also test with versions such as 2.1.8 and 2.2.3? Has there been any language features that worked in Ruby 2.0 and Ruby 2.3 but were temporarily not working or…
Kimmo Lehto
  • 5,910
  • 1
  • 23
  • 32
1
vote
2 answers

Rails error `
': undefined method `activate_bin_path' for Gem:Module (NoMethodError)

In my terminal. When I try to run rails new or rails -v , I get this error message. I have updated my ruby to 2.3.1 and re-installed rails. /usr/local/bin/rails:22:in `
': undefined method `activate_bin_path' for Gem:Module (NoMethodError)
diwao11
  • 151
  • 2
  • 15
1
vote
1 answer

I cannot update Ruby on Homebrew from 2.0.0 to 2.3.1

I am trying to upgrade Ruby because I need to setup a Jekyll template, and I need to latest version to do it. Since I have a Mac running Sierra, I already have Ruby preinstalled as well as the Homebrew installation. When I install it using brew…
fwjggYUKGFTYucfty
  • 136
  • 1
  • 2
  • 12
1
vote
2 answers

Why does Range#select produce an Array object?

Consider I have a Range object, (1..30).class # => Range Now consider I am trying to find the factors of num, num = 30 factors = (1..num).select { |n| num % n == 0 } factors.class # => Array For Ruby 2.3.1 a Range object does not have #select, but…
N Altun
  • 95
  • 1
  • 2
  • 9
1
vote
1 answer

Can't use rvm install rails 5 gem

I tried to create gemset rails500 by ruby-2.3.1 and I got : Using /Users/ChamperWu/.rvm/gems/ruby-2.3.1 with gemset rails500 jiaqideMacBook-Pro:unispot ChamperWu$ gem install rails Fetching: i18n-0.7.0.gem (100%) Successfully installed…
Champer Wu
  • 1,101
  • 3
  • 13
  • 32
1
vote
3 answers

Error while running ruby script

When I try run rubyscript via terminal using ruby test.rb command It shows me the following error: MacBook-Air-K:myapp uzytkownik$ ruby…
Miszo97
  • 303
  • 2
  • 11