Questions tagged [ruby-2.6]

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

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

44 questions
12
votes
1 answer

ERROR: Error installing racc: ERROR: Failed to build gem native extension

Ubuntu 20.04.2 LTS Installing Rails 6.1.3.1 Ruby: 2.6.5 Installing rails: gem install rails -v 6.1.3.1 --no-doc Fails to install racc-1.5.2 Trying to manually install racc-1.5.2: gem install racc -v '1.5.2' --source 'https://rubygems.org/'…
Eric Wanchic
  • 2,046
  • 1
  • 23
  • 26
7
votes
6 answers

Can't install ruby 2.6.6 via rvm, error running '__rvm_make -10' on macbook pro m1

While installing the ruby 2.6.6 I'm getting this error: Error running '__rvm_make -10' please read /home/.rvm/log/1642694273_ruby-2.6.6/make.log There has been an error while running make. Halting the installation. I've tried to reinstall rvm but…
spirito_libero
  • 1,206
  • 2
  • 13
  • 21
7
votes
5 answers

Mismatched bundler version - bundler 2, ruby 2.6

We've just updated ruby to 2.6 and bundler to 2. Now we're getting: # bin/rails console You must use Bundler 2 or greater with this lockfile. This was previously happening with bundle exec: # bundle exec rails console You must use Bundler 2 or…
Dave Slutzkin
  • 1,592
  • 14
  • 19
5
votes
1 answer

Papertrail: records with nil whodunnit values and object_changes in logs

I've set papertrail to only record changes containing a whodunnit value/when an admin makes a change by using the below condition in my model: has_paper_trail if: proc { |model| PaperTrail.request.whodunnit.present? } However I've noticed there are…
L457
  • 1,002
  • 1
  • 13
  • 33
3
votes
2 answers

Undeclared instance variables default to nil?

Due to some sloppy coding on my part, I've noticed that undeclared instance variables seem to evaluate nil where undeclared local variables do not. Is this default nill value for instance variables intended behavior that I can exploit (like with a…
neanderslob
  • 2,633
  • 6
  • 40
  • 82
3
votes
1 answer

How to upgrade ruby version to 2.6.3 in amazon linux

I booted up a amazon linux machine in which the default ruby version was ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]. I want to update it to 2.6.3. I found this article How to upgrade ruby version in Amazon Linux system?. But when I…
Kaushik Vijayakumar
  • 755
  • 3
  • 10
  • 19
3
votes
0 answers

Why does mjit functions get invoked?

I'm doing research in ruby interpreter and mJIT. And, as a first step, I would like to understand the behaviors of both. Thus, I simply ran a very simple ruby program without --jit command puts ("hello world!") and got the execution trace of it.…
HJL
  • 127
  • 6
3
votes
2 answers

Which ruby methods free GVL?

In multi-threaded ruby execution, you cannot get parallel execution of threads unless you use those functions which frees GVL. In my understanding, following ruby methods frees GVL: Kernel#sleep IO#read and IO#write Question In pure ruby, is…
Yuki Inoue
  • 3,569
  • 5
  • 34
  • 53
2
votes
0 answers

Wrong number arguments error when using unpacked keyword args along with send

I noticed that attempting to use the send method while passing in unpacked keyword args as a variable led to some unexpected behavior. First the setup: class SomeClass def some_method true end end kwargs = {} c =…
Raphi
  • 410
  • 4
  • 17
2
votes
1 answer

How to split string with accented characters in ruby

Currently I got : "mɑ̃ʒe".split('') # => ["m", "ɑ", "̃", "ʒ", "e"] I would like to get this result "mɑ̃ʒe".split('') # => ["m", "ã", "ʒ", "e"]
Kevin
  • 65
  • 5
2
votes
3 answers

What is the Ruby equivalent of Python's iter()/next()?

In python I can get an iterator from any iterable with iter(); and then I can call next(my_iter) to get the next element. Is there any equivalent in ruby/rails?
mshsayem
  • 17,557
  • 11
  • 61
  • 69
2
votes
1 answer

Installing Ruby 2.6 on Ubuntu 18.04 - bundler path error

I've installed Ruby 2.6.6 on Ubuntu 18.04 using the following commands: wget http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.gz tar -xzvf ruby-2.6.6.tar.gz cd ruby-2.6.6/ ./configure sudo make install ruby -v confirms 2.6.6 installed. But then…
Nick W
  • 877
  • 2
  • 15
  • 30
2
votes
1 answer

whitelist_classes error when running rspec with ruby 2.6.5

When I upgraded from ruby 2.5.7 to ruby 2.6.5 with a rails 6.0.2 app, then all the rspec tests fail. An example error is An error occurred while loading ./spec/models/account_spec.rb. Failure/Error: require…
Obromios
  • 15,408
  • 15
  • 72
  • 127
2
votes
0 answers

Ruby 2.5.3 to 2.6.0 leads to Policy already configured error

When I update ruby 2.5.3 to 2.6.0 and try to run RSpec specs then it's throwing policy already configured error The error stack as follows An error occurred while loading ./spec/controllers/example_controller_spec.rb. Failure/Error: require…
CodecPM
  • 423
  • 6
  • 18
2
votes
0 answers

How to run rails initialization code that relies on all classes being loaded?

I have some crucial application setup code that I want to run once on application spinup that requires iterating through classes of a certain type and calling a gem specific initialize method on them. According to How can I preload concerns in a…
Andrew
  • 942
  • 10
  • 26
1
2 3