Questions tagged as 'ruby'

1
answer

Assign model to session variable in rails 4

I would like to know if it is possible to save an article object in a variable of session for example I have this code but it gives me this error:    undefined method 'add_cesta' for "#": String This is what I'm trying to do: Th...
asked by 08.09.2017 / 02:23
2
answers

XML API Product FEED

I want to develop a product feed with my suppliers. This is the XML that the API gives me with the available or exhausted products of this distributor to obtain general information about the product but mainly stock, sku, price ... <Item>...
asked by 27.07.2017 / 17:57
1
answer

Use form that corresponds to another controller

Context Form is created through command $ rails g scaffold Cotizacion Template installed from link Objective and problem The idea is to integrate the form new , which creates a new quote to the bootstrap template. Un...
asked by 21.07.2017 / 18:12
1
answer

Spree gem checkout error, error "We are unable to calculate shipping rates for the selected items."

I am starting an ecommerce and use Spree as a gem gem 'spree', '~> 3.2.0' gem 'spree_auth_devise', '~> 3.2.0.beta' gem 'spree_gateway', '~> 3.2.0.beta' when wanting to make a payment I get this alert:    We are unable to calcula...
asked by 29.04.2017 / 00:28
1
answer

Show name and extension of a file when editing form using carrierwave gem in rails

I'm using the gem carrierwave to upload documents in my project, and it works perfect, my problem is when I want to edit the form, having previously saved a document, the button to upload a document or image appears with the caption "No f...
asked by 07.04.2017 / 12:42
2
answers

(Network error while fetching https://rubygems.org/quick/Marshal.4.8/puma-3.8.1.gemspec.rz)

I get this error when running bundle install, I'm new to rails the first time you go to: Network error while fetching link     
asked by 13.03.2017 / 19:05
1
answer

Problem with nested routes

I have the following nested path: resources :companies do resources :weeks do resources :payrolls end end My problem arises when I realize a new_company_week since it ignores my answer. In the controller I have the follow...
asked by 16.05.2017 / 19:15
1
answer

Why do I get this error in Ruby "ActionController :: UrlGenerationError"?

What I want to get is to get to my form to be able to add information or new records but the problem is that when I click on add new, I get an error tab. Controller def new @serie = Serie.new(); end def create @folio = par...
asked by 18.12.2016 / 20:17
1
answer

avoid duplicate records in query and date correction

I have two small problems with a query 1) I am conducting a search of the clients related to the logs, this query should bring me those bitacoratime logs where the code is equal to the id of the clients, the problem is that the clients should...
asked by 23.12.2016 / 00:26
1
answer

duplicate records of a query

I am making a query to find all those products that are not related to a table called Stock where the "Path" field within the Stock table is different from the id that I am passing through the URL. I'm doing it in the following way: @productos...
asked by 17.11.2016 / 22:59