Questions tagged [ruby-2.2]

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

For issues relating to development in Ruby, version 2.2. It was released on December 2014. You can check the official docs here.

If your question applies to Ruby in general, use the tag .

119 questions
0
votes
1 answer

rails 4 resets session on every request in production

I am implementing web app using rails 4.2.0 and ruby 2.2.0 and facing problem that any time request in done new session is set. In that case I cannot save anything to session since it's gone. Also that leads to situation that authenticity token…
0
votes
2 answers

Check and select the latest one from the array of hashes

I have to check and select the latest one from the array of hashes. The structure is like this: 'histories':[ { { ... }, 'created': "date1", 'items':[ { 'a': "Ready", 'b': "dfknsknfs", }, { 'a': "sdfjbsf", …
Ahmad hamza
  • 1,816
  • 1
  • 23
  • 46
0
votes
1 answer

ruby `stack level too deep error` when trying to user order param

I'm trying to add a sort_by params to a rails app that uses Kaminari for paging. When add the param to the query I get a stack level too deep error. app/controllers/file_items_controller.rb class FileItemsController < AccountsController def index …
Antarr Byrd
  • 24,863
  • 33
  • 100
  • 188
0
votes
1 answer

wrong number of arguments (0 for 1..2) Rails 4.2.0 and Ruby 2.2.2

I'm trying to embedded mail_form into my home page. The 'contacts#new' is rendered on 'static_pages#home' so I instantiate @contact in StaticPagesController's home action to avoid the "First argument in form cannot contain nil or be empty"…
d_dnara
  • 49
  • 1
  • 5
0
votes
2 answers

Customize Admin template in Shoppe

I am working on a Rails project to build an E-commerce website. I am using Shoppe gem. I refer Tryshoppe website. As shoppe gem mounts an Admin interface for us but as per my requirements I want to customize it. I am also interested in changing the…
Nishant Upadhyay
  • 639
  • 7
  • 20
0
votes
1 answer

Do I still need gctools with Ruby 2.2 even though its garbage collection has been upgraded?

I am upgrading my app to use Ruby 2.2, and was going to remove gctools since I think it specifically supports Ruby 2.1's garbage collection. Any reason I should keep it?
Dan Williams
  • 3,769
  • 1
  • 18
  • 26
0
votes
1 answer

Nested model forms (accepts_nested_attributes_for) in Rails 4.2.0: subfields not displaying

I am having trouble getting a nested form to work in rails 4.2.0 and ruby 2.2.0. I went back and tried to follow the Railscast from 2010, but even following that example my subfields aren't showing up. What am I doing wrong? Is there a new best…
Lee
  • 686
  • 1
  • 10
  • 23
0
votes
1 answer

Compile error ruby eventmachine for OpenWRT Barrier Breaker errors with "error: size of array '...' is negative"

I have embarked on creating a package of Ruby 2.2 with Event Machine for OpenWRT Barrier Breaker. The makefile for the eventmachine package can be seen here: https://github.com/DaKaZ/ruby-openwrt/blob/master/packages/ruby-eventmachine/Makefile I…
DaKaZ
  • 925
  • 1
  • 7
  • 18
0
votes
3 answers

Assets pipeline doesn't work in 'application.scss' in my Rails 4.2 app

I'm new in Rails and apologize if that is a stupid question. But i cannot resolve my problem: I added Bootstrap to my new app but it still doesn't use any new styles. I've renamed application.css to application.scss and created such…
0
votes
1 answer

Ruby 2.2.0 and Rails 4.2 destroying nested attributes

Apps that run in Ruby 2.2.0 and Rails 4.2 are giving me problems when dealing with nested attributes esspecialy when i am trying to delete one or more of them. The same code in previous version works as it should. I have read throug these…
0
votes
1 answer

Security fixes for Rails 3.2-stable

I use Ruby 1.9.3 and Rails 3.2.21 in my app. I'm going to upgrade Ruby to 2.2.0. I'm going to use Rails 3-2-stable, because Rails 3.2.21 doesn't support this version of Ruby (https://github.com/rails/rails/issues/18201). Does anybody know if new…
Sergei Struk
  • 358
  • 4
  • 12
-1
votes
1 answer

Working on | | and && operators

I was doing something and I find bit confusing && operator functionality. When I do 5 || 15 => 5 nil || 15 => 15 5 || nil => 5 But when I do it with && operator. 5 && 15 => 15 nil && 15 => nil 5 && nil => nil Can someone help me understand ?
Anuj
  • 1,737
  • 3
  • 16
  • 29
-2
votes
4 answers

How to extract value from hash in Rails

I have a Hash and need to use the value year from a variable in it The example is: 2.2.4 :001 > @values_project => [#] and I need the year so…
martincito
  • 389
  • 4
  • 10
-2
votes
1 answer

Ruby syntax error with declarative concept of using variable

I am trying to use the reactive programming concept in ruby, I have create two block of code: 1 Imperative a = 5, b = 2 c = a + b print c #=> 7 a = 2 print c #=> 7 2 Declarative a := 5, b := 2 c := a + b print c #=> 7 a := 2 print c #=>…
Dinesh Saini
  • 2,917
  • 2
  • 30
  • 48
1 2 3 4 5 6 7
8