Questions tagged as 'ruby-on-rails'

2
answers

Ruby error after updating ubuntu

After updating Ubuntu, it does not load Ruby anymore or something, the error message that returns is:    / usr / bin / env: "ruby2.1": File or directory not found Every time I have to start the application     
asked by 01.07.2016 / 03:02
1
answer

Problem of perfomance when returning json with rabl after consultation with activerecord

I'm having trouble adjusting performance by returning json after a query to the database. I've tried a lot of things, and I'm not getting any faster. Can anyone give me strength with this? This is the query in the controller Methodnotmo...
asked by 29.06.2016 / 21:06
1
answer

Multiple Joins with Active record returning null

Friends, I have the following console outputs (Rails 4.1): Product.all Product Load (0.2ms) SELECT "products".* FROM "products" => #<ActiveRecord::Relation [#<Product id: 4, cod: "160", descricao: "Sutiã", price: #<BigDecimal:...
asked by 02.06.2016 / 21:07
1
answer

Select duplicate field with chosen-rails and relationship has many through

Personal speech, I have a GROUP_TV table and it relates to the City table through the has many through. In the _from.html.erb of the GROUP_TV view, I have a collection_select to select as many cities as I want. This works perfectly. The...
asked by 06.05.2016 / 22:23
0
answers

iugu checkout example for rails does not work

I'm trying to make this iugu example work: link I have a iugu account in test mode. I followed the steps in this tutorial, I made the necessary modifications like putting my account id in the defined place and the api key in the controll...
asked by 02.05.2016 / 20:42
0
answers

f.label is overwriting the information that is in f.text_field

    <% = f.label "SUS Number"% >     <% = f.text_field: sus_number% >        <% = f.label & quot; Patient & quot;% >     <% = f.text_field: name,: class = > 'form-control'% >        
asked by 30.05.2016 / 07:17
1
answer

Parameters Action Mailer with BlueHost Brasil

Hello, I'm trying to send notifications in my rails application, in development mode. With GMAIL, everything is ok, but I'm not able to use it with the hosting I have at BlueHost Brasil. I've tried changing several parameters, it's currently lik...
asked by 25.04.2016 / 06:16
1
answer

I would like to connect rails to Intel xdk

My final goal is to create an app in xdk that interacts with rails. If nobody knows exactly how it works but give a light on how to access sqlite with ruby and javascript already helps a lot. I have some doubts about the correct way to do this....
asked by 18.04.2016 / 05:30
1
answer

Problem with Mysql connector in rails

I am not able to create a database for my Rails application it says the following message: Error    C: \ Ruby21-x64 \ DevKit \ Project> rake db: create DL is deprecated, please   use Fiddle rake aborted! LoadError: Please install the mys...
asked by 01.04.2016 / 01:18
2
answers

How to pass an Array to the IN clause of a flat query?

I'm using ActiveRecord to run queries on several different databases. In one of the queries, I have to do the following: publications_to_read = [1,2,3,4] ActiveRecord::Base.connection.execute("ALTER TABLE publications SET readed = TRUE WHERE i...
asked by 13.04.2016 / 02:22