Data dodania Pytanie
2017-02-09 14:02 Http testing my ruby based API »
I'm trying to test my ruby API, but I m facing some difficulties to send the right data format. I can easily create a desired data format from rspec c...
(1) odpowiedzi
2017-02-09 11:02 Rails: How to write model spec for this method? »
I've just started to take on my first model spec task at work. After writing a lot of feature specs, I find it hard to get into the different perspect...
(1) odpowiedzi
2017-02-09 10:02 find_or_create_by trying to create duplicate records with hmt association »
I'm curious if there is another way of achieving the following. Setup: class Cabin < ApplicationRecord has_many :feature_groupings has_many ...
(1) odpowiedzi
2017-02-09 09:02 RSpec/Capybara does not commit to DB within test »
I'm quite desperate since moving our test suite from Minitest to RSpec. All the controller and model tests run fine so far, but since trying to port (...
(1) odpowiedzi
2017-02-09 00:02 Rufus cron scheduling not working on a jetty server »
Steps to replicate: Create a new Rails project. (rails 3.2.22.5) Add dependencies (warbler, rake, rufus-scheduler) (/Gemfile) JRuby 9.1.7.0 Create...
(2) odpowiedzi
2017-02-08 23:02 Build up help for TDD/BDD with RSpec »
For about 2 weeks ago i've started learning Ruby, i've made an WebParser / Page WordCounter using 'open-uri' and 'nokogiri'. So i just run up the term...
(1) odpowiedzi
2017-02-08 22:02 Multiple LIKE and AND operators in RAILS/POSTGRESQL »
I'm using Rails 5.0.1 and Postgresql as my database. I have a table with column :content which contains words. The problem: When I'm looking for a sp...
(3) odpowiedzi
2017-02-08 18:02 Why is Rufus scheduling the job twice? »
Steps to replicate: Create a new Rails project. (rails 3.2.22.5) Add dependencies (warbler, rake, rufus-scheduler) (/Gemfile) JRuby 9.1.7.0 Create...
(1) odpowiedzi
2017-02-08 18:02 Rails has and belongs to many duplicate entries »
I have 2 models and a join table('email_addresses_mailable_events'). Database being used is Postgres. class MailableEvent < ApplicationRecord ...
(0) odpowiedzi
2017-02-08 17:02 RSpec cannot find route for nested resource »
I'm dealing with a seemingly strange issue while trying to run unit tests on a nested resources controller. Here's my setup: routes.rb: Rails.applic...
(1) odpowiedzi
2017-02-08 16:02 Ruby unicorn needs to debuggin - server cpu goes 100% »
We have a ruby api server which was working perfectly fine, there was a problem with the elastic search server After fixing this, the server cpu goes ...
(0) odpowiedzi
2017-02-08 15:02 Remove before_validation callback in rails using class_eval »
I have a class in my model written inside a vendor's code(which I cannot modify) which has a Proc attached to it. Considering an example for a shirt c...
(2) odpowiedzi
2017-02-08 14:02 How to determine concurrency (threads) while using shoryuken for background jobs? »
In my Ruby on Rails application, I'm using shoryouken for background processing. I've many sqs queues (6-7) in my application. One of the queue has 20...
(1) odpowiedzi
2017-02-08 13:02 RSpec strange behaviour: doesn't see controller action »
I have hierarchy of my Controllers Backend::ProductsController < Backend::ModelController < Backend::BackendController < ApplicationControll...
(0) odpowiedzi
2017-02-08 04:02 Ruby - Implementing custom sort »
I have this array of Hash: hash = [ { distance: 0.3997651063189804, project_id: 1, project_name: "Project 1", project_dependents_ids: [4] ...
(1) odpowiedzi
2017-02-08 02:02 Installing RVM - No Output, Failure »
I'm on MacOS Sierra brew doctor says no problem xcode/gcc is installed My first problem is no response when I use curl. And here is what I get whe...
(1) odpowiedzi
2017-02-07 22:02 Rails memory leak: controller class holding a reference to instance »
I have a memory leak in a Rails 4.2.6 application. A controller allocates a large GaragesPresenter object as an instance variable, which should be de...
(2) odpowiedzi
2017-02-07 20:02 Ruby on Rails: Left Outer Join with Sort »
I have a RoR application for sending emails, I have the models Contacts, Recipients, and Users, whereby a user can have many contacts and a contact ca...
(2) odpowiedzi
2017-02-07 20:02 ActiveRecord::ConnectionAdapters::Column jdbc error "uninitialized constant" in jruby 9 and rails 5+ »
I am attempting to install and run jruby 9.1.7.0 and rails 5.0.1 on Windows 10. Everything seems to be fine on the install, but as soon as I start a ...
(0) odpowiedzi
2017-02-07 14:02 How to resize VM disk with RbVmomi in Ruby »
I'm working on a project where I'm cloning a VM with RbVmomi and after the clone is finished I want to ReConfig the VM. The cloning is working great...
(2) odpowiedzi
2017-02-07 14:02 Create a user with another model »
I am trying to create a user from another model (Corporacion), I wrote this in the Corporacion model: after_create :createUser def createUser @...
(1) odpowiedzi
2017-02-07 01:02 Ruby dynamically assign numbered variables »
I cant find a similar question, but I'm sure it's out there somewhere so please point me in the direction if it is. I'm writing an rspec test and want...
(1) odpowiedzi
2017-02-07 01:02 Adding wicked_pdf gem causes rspec view spec to fail with NoMethodError »
I've got a weird situation and I'm not sure how to even start debugging it. Would love any advice or direction that someone can provide. I've got 64...
(0) odpowiedzi
2017-02-07 01:02 Rails 4 nested where clause on joined table that has multiple associations »
I have an Order model that has TWO associations to a VoyageLeg Model (which then belongs to a Port) as below: class Order < ActiveRecord::Base b...
(1) odpowiedzi
2017-02-07 00:02 How validate Model with before_filter? »
I want to make the validation of the Model and move it to before_filter. How in the filter can be assigned to the standard validators presence, etc.? ...
(0) odpowiedzi
2017-02-06 23:02 Getting "incompatible character encodings: UTF-8 and ASCII-8BIT" error when displaying user entered ASCII-8BIT character »
A user saves text in a form with the word "café," (note the "é"). When loading the #show page displaying this text, I get an Encoding::Compatibility...
(1) odpowiedzi
2017-02-06 22:02 CRUDL - Accessing ROR item with parameter other than id »
I am designing a Web API and a local database for devices to use. These databases sometimes communicate. Because items in each database have different...
(1) odpowiedzi
2017-02-06 19:02 Rails: best practice to load a helper in controller »
I was hired some days ago to update a Rails 4 app. In general the rspecs and the code look good however in the top of some controller a found this lin...
(1) odpowiedzi
2017-02-06 15:02 Paperclip before upload callback »
I am working on a rails application that uses Timecop gem for "time traveling" and I have a problem... When I try to upload a file on Amazon S3 using ...
(1) odpowiedzi
2017-02-06 15:02 rails 4 API gives 401 unathorized response after successful log in using angular2-token package »
I have a setup in which I have a rails 4 API having the gem devise_token_auth and hosted as a separate application so I have also rack-cors configured...
(1) odpowiedzi
2017-02-06 12:02 Rspec model callback »
I have this model that my senior dev wrote: class Thing < ActiveRecord::Base after_commit on: :create do SomeMobule.some_method(self) end ...
(1) odpowiedzi
2017-02-05 21:02 Nested resources create_checklist for all users in commandline on has_one association »
Sorry if this has been asked already, but I can't find any questions similar. Using rails 5. I have a double-nested resource resources :users do ...
(2) odpowiedzi
2017-02-05 20:02 Update nested_attributes by default »
I try to update iproduction, a nested form from production and I have an error of params with this line : "wrong number of arguments (0 for 1)" @prod...
(1) odpowiedzi
2017-02-05 18:02 Ruby and Rail Application Error when Running Bundle install »
I am following a heroku tutorial where I created my rails app. I was asked to use Heroku to get my app live online. But I have troubled to run the co...
(0) odpowiedzi
2017-02-05 15:02 Rails/SQL: How to order grouped records »
I have a tabel called SessionHistory with the column of ip. I now want to first group the records having the same ip and then sort the groups by the ...
(1) odpowiedzi