Data dodania Pytanie
2018-02-19 19:02 undefined method `[]' for nil:NilClass(path) »
I am beginner in Ruby who's looking to debug an issue in my "index" view. I am trying to list out different values for dataset. However, I am not sure...
(1) odpowiedzi
2018-02-19 15:02 How to pass extra params inside option hash in confirmation email in Rails? »
I am trying to pass extra params inside the options{} hash in the confirmation email but It is just showing me subject and from headers in the mailer....
(1) odpowiedzi
2018-02-19 12:02 Rails Stub a variable inside module »
I wrote a unit test for this module and want to stub current_account variable which comes from application controller. (its global method written in a...
(1) odpowiedzi
2018-02-18 18:02 dynamically adding button based on my label text database column in rails »
I have a rails app, in which I want to add buttons dynamically based on my label text in the database.I have a questionnaire schema and it contains la...
(1) odpowiedzi
2018-02-18 12:02 If any substring in a string contains the required regex »
mailto:abcd@gmail.com wont match the email regex. /\A[\w+-.]+@[a-z\d-]+(.[a-z\d-]+)*.[a-z]+\z/i I want to check if any substring in the given string...
(2) odpowiedzi
2018-02-17 23:02 Ruby When use and pass parameters to functions? »
I would like to redirect the user in the authetication method if the request format is html or json, but always just show as the json format has been ...
(1) odpowiedzi
2018-02-16 23:02 How does RVM pick where to find the gem »
I noticed that rvm has more than one directory for saving 2.3.0 gems. /usr/share/rvm/gems/ruby-2.3.0/gems /usr/share/rvm/rubies/ruby-2.3.0/lib/rub...
(0) odpowiedzi
2018-02-16 22:02 How to remove Failed to create chart: can't acquire context from the given item error while using it with Ruby on Rails? »
I installed frappe charts for ruby on rails through gem. Then I tried to run one of the frappe-chart code which is given in their website: let ...
(0) odpowiedzi
2018-02-16 14:02 Refresh database (mySql) using jquery rails »
I am trying to read data from mysql database, it is basically the pincode and comparing it with the near location. I need to check the database every...
(1) odpowiedzi
2018-02-15 10:02 how can i test my job model and what are the missing things »
i'm used to test job model(rspec), i write few unit test scenario for job models. what are the missing things that i need to add. could you please hel...
(0) odpowiedzi
2018-02-15 08:02 ruby with stack-driver credentials fail to authenticate at the circleCI level »
I am trying to use GCP stack-driver for my ruby project to monitor logs and debugging . the issue is when i copy my credentials file path to my circle...
(1) odpowiedzi
2018-02-15 08:02 how to send params from other view modal form to another controller »
I have an application in which user can add a question, so user will fill the modal form, I have two model Client_prefernces and questionnaire questi...
(2) odpowiedzi
2018-02-14 12:02 how to check if a certain key-value pair exists in array of hashes as json in ruby on rails »
I have an array of hashes as json, so how to check my array of hashes contains a hash with a given key-value pair. This is my json [{"question"=>...
(5) odpowiedzi
2018-02-14 05:02 How to test my devise code using rspec? »
Here is my unit testing code for devise. Are there any ways to write better test code? user_spec.rb: require 'rails_helper' RSpec.describe User...
(1) odpowiedzi
2018-02-13 23:02 read a file and find if a string exists and return the tablename »
I am trying to read a file, if the file has 'alter table' then it has to search for 'modify' if modify exists then it has to return the table name. Fo...
(1) odpowiedzi
2018-02-13 10:02 Stop code execution if file is missing »
I use this code in order to load configuration file. def load_environment_config(gateway, trx_type) @config = YAML.load_file("config/#{env}_config....
(1) odpowiedzi
2018-02-13 08:02 Automation Testing - Aviod/Block popups with cucumber/watir in Ruby on Rails »
How to avoid/block the popup messages/windows in the cucumber automation testing using watir gem only ...
(0) odpowiedzi
2018-02-12 12:02 mysql2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension »
When I download the rails application from github https://github.com/ari/jobsworth An then give bundle install it throws error: Gem::Ext::BuildError:...
(0) odpowiedzi
2018-02-12 08:02 Best way to generate large Zip File in Rails »
I am generating Zip File in background process (sidekiq) by downloading pictures from S3 url and then uploading & sending the download ZIP link vi...
(0) odpowiedzi
2018-02-12 00:02 Fetch id of selected option in dropdown in controller »
I have a model named 'Assessment': class Assessment < ApplicationRecord has_many :assessment_students has_many :students, through: :assessment...
(2) odpowiedzi
2018-02-11 08:02 Rails: select related active records on join table »
I have two models Magazine.rb and Keyword.rb, both are related through a simple join table. One magazine is defined by many keywords and a keyword can...
(1) odpowiedzi
2018-02-10 17:02 Rails: how to join two models through two different relations? »
I have two models: Saft (a magazine) and Keyword. Each "Saft" is defined by a series of keywords, but also has a title, which is always one of its key...
(1) odpowiedzi
2018-02-10 15:02 C:/Ruby23-x64/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir': Invalid argument »
When I was trying to use rails g rspec:install, it will display above error. How can I resolve this issue? rails g rspec:install create .r...
(0) odpowiedzi
2018-02-10 05:02 Looks like your app's ./bin/rails is a stub that was generated by Bundler »
Looks like your app's ./bin/rails is a stub that was generated by Bundler. In Rails 5, your app's bin/ directory contains executables that are versio...
(0) odpowiedzi
2018-02-09 17:02 Is there a way to keep POSTed XML in tact in Ruby on Rails? »
I have a REST API in my Rails app that users will be posting XML to. I know that Rails (perhaps Rack in this case) converts the posted data to a param...
(2) odpowiedzi
2018-02-09 12:02 WARN: Unresolved specs during Gem::Specification.reset: »
C:\Users\Anuradha-PC\Desktop\Ruby\Jobs_board2>rails g rspec:install Looks like your app's ./bin/rails is a stub that was generated by Bundler. In Rai...
(0) odpowiedzi
2018-02-09 08:02 How can I use database views along with table in rails »
My question is simple. My DBA suggested to create a view and use it in your class class MyClass scope :some_method, -> { select('some statement'...
(0) odpowiedzi
2018-02-07 19:02 Parameters will not pass in the child class »
When I'm trying to create a job, it will show "company must exist", c_name and company_id will not pass in the views/jobs/_form Migrations class Cre...
(1) odpowiedzi
2018-02-07 17:02 Error pushing Ruby on Rails to heroku »
I have added the pg and rails_12factor gem to my gemfile and tried to push my app to heroku but the website just says application error, I was able to...
(2) odpowiedzi
2018-02-07 10:02 Error: `getwd` : No such file or directory - getcwd? »
Can you anyone help me how to solve this problem gems/bundler-1.16.0.pre.3/lib/bundler/shared_helpers.rb:71:in `getwd': No such file or directo...
(0) odpowiedzi
2018-02-06 18:02 How to seed join table data from yaml file through seed.rb in Rails »
I am trying to add to my seed.rb the ability to load data onto a join table for my ROR 3.2.5 application. I have two models: Saft.rb and Keyword.rb, ...
(1) odpowiedzi
2018-02-06 15:02 Routing Error when creating new html.erb file in views no route matches wrong controller »
No route matches {:controller=>"persons", :locale=>:de} I want simple page with just text which I call info.html.erb. I saved it in app/views/...
(0) odpowiedzi
2018-02-04 13:02 How to start existing project rails? »
I found a project on GitHub but I have problems running it. Can someone please try and let my know how to do this? I downloaded the project, started ...
(1) odpowiedzi
2018-02-02 19:02 Trying to unzip a 600mb tgz with ruby gives out of integer range error »
Trying to untar a tgz file... with the following code: tar_extract.each do |entry| entry_filename = File.basename(entry.full_name) next if entry....
(2) odpowiedzi
2018-02-02 08:02 Words length in Faker »
How to generate array of words of specific length from Faker gem in rails? For example I would like to make an array of five words, where each word's ...
(2) odpowiedzi