Data dodania Pytanie
2017-05-10 14:05 How to get form values in browser to watir webdriver »
I have installed my application and it is running on following URL http://localhost:3000 Above URL will the load form with some fields, Then I will ...
(1) odpowiedzi
2017-05-10 11:05 How can I get verbatim href attribute »
I have a page-internal link in an html page: <div class="bar"> <a href="#foo">Go to foo</a> </div> I selected this anchor...
(1) odpowiedzi
2017-05-10 09:05 minitest_plugin.rb:9 getting wrong number of arguments »
~/Sites/sample_app$ rails test Running via Spring preloader in process 24338 Run options: --seed 58780 Running: .. Finished in 0.292172s, 6.8453 ru...
(3) odpowiedzi
2017-05-10 02:05 What is the difference between Object.class and Object.class.inspect in Ruby? »
It seems like both of these methods return the same result (a human readable representation of the object and it's type). What is the differences betw...
(2) odpowiedzi
2017-05-10 00:05 undefined method `have' for #<Object:0x007f997fabf778> (NoMethodError) »
I am getting a undefined method error message for the 'have' method. expect(@gymhomepage.find_your_local_gym).to have(@gymhomepage.find_your_local_...
(1) odpowiedzi
2017-05-09 22:05 Does Ruby have something similar to .=, like +=? »
Since one can do: a += 1 I was thinking whether one can also do something similar to: a .= 1 The use case would be, for example, with ActiveReco...
(2) odpowiedzi
2017-05-09 21:05 cap deploy + rbenv: bundle: command not found »
I am following https://gorails.com/deploy/ubuntu/16.04 I am running : "bundle exec cap production deploy" and getting the following error: ✔ 1...
(1) odpowiedzi
2017-05-09 19:05 How to solve the the Curl's "Couldn't connect to server" »
I'm using Rspec with Capybara with WebMock for my tests (also I'm using Charles proxy), Getting the following error, never in a specific test. I've h...
(0) odpowiedzi
2017-05-09 17:05 Is is possible to return virtual attributes automatically in Rails models? »
Given: class Foo has_one :bar def bar_name bar.name end end class Bar belongs_to :foo end In the console or in a view, I can @foo.bar...
(2) odpowiedzi
2017-05-09 14:05 Define multiple custom records using FactoryGirl »
I have a hash of key and values that I would like to be created using FactoryGirl. I went through a POST with similar requirements, but couldn't under...
(1) odpowiedzi
2017-05-09 12:05 Failure of Ruby case equality operator === »
I have: require 'date' pap1 = Date.parse('1968-06-12') pap2 = Date.parse('1968-12-31') dat = Date.parse('1968-06-12') dat2 = dat + 5 # => #<Da...
(1) odpowiedzi
2017-05-09 10:05 How can Ruby transform a method into a symbol as argument? »
The respond_to? method takes as argument, a method to be checked, but as a symbol. Why as symbol? And how does ruby convert the method into a symbol?...
(1) odpowiedzi
2017-05-09 04:05 Testing app with RSPEC and Elasticsearch »
I am generating the test of my app rails with RSPEC, in the application implement searches with elasticsearch with the gem Tire. Running the tests ...
(0) odpowiedzi
2017-05-08 23:05 How do I order an array in ruby when ordering has four different conditions? »
I am not sure how I can re-order an array based on two booleans in Ruby. I would like to order my results in the following order: * Note awkward ord...
(2) odpowiedzi
2017-05-08 22:05 How to remove characters from String at specific index in Ruby »
I have some strings like this: 'Set{[5, 6, 9]}' 'Set{[8, 4, "a", "[", 1]}' 'Set{[4, 8, "]", "%"]}' I want to remove the square brackets at indices...
(2) odpowiedzi
2017-05-08 21:05 Issues with axios POST requests (javascript) and Sinatra/Base API (ruby) »
I keep getting issues with attempting POST requests to my Ruby Sinatra/Base API using the javascript library axios I have an example POST route in my...
(0) odpowiedzi
2017-05-08 21:05 Is Rails 5 support all gems from rails 4? what if we need to use that has not been upgraded for rails 5 »
I have a meaning to make a rails application in rails 5 but i am confused which one should i need to go, rails 4 or rails 5. Rails 5 support good feat...
(1) odpowiedzi
2017-05-08 20:05 Rails how to make conditional inside iteration? »
i'm trying to use a conditional inside a iteration but did not worked so, here the scenario: in this case if the if the order or the product is prese...
(1) odpowiedzi
2017-05-08 18:05 What is the best way to test array of hashes with RSpec? »
I'm trying to test array of hashes with RSpec, but I don't know how to test them because the hash order could change. E.G: [{name: 'John', age: 40, c...
(2) odpowiedzi
2017-05-08 16:05 Best practice for updating Rails database to stop getting undefined method `name' for nil:NilClass errors »
General question here about Rails development. If say I develop a Rails application and then down the line I add in a column to a table in my database...
(1) odpowiedzi
2017-05-08 15:05 Running a ruby sinatra postgreSQL error »
I have been trying to run my ruby app that previously was run on my MACbook. Currently, I am using a Windows OS and bash. PostgreSQL is installed. So ...
(0) odpowiedzi
2017-05-08 12:05 Unable to Send mails in rails? »
I am trying to send welcome mail when user registers but everything seems fine the same code i have used in different project as well but the mail is...
(1) odpowiedzi
2017-05-08 09:05 Insert in DB array checkbox rails »
Need help for array insert in db using check box. <% @companies.each do |company| %> <%= check_box_tag 'company_name[]', company.company...
(3) odpowiedzi
2017-05-08 08:05 How to handle external service failure in Open-Uri? »
In my Rails app I am trying to fetch a number of currency exchange rates from an external service and store them in the cache: require 'open-uri' mo...
(0) odpowiedzi
2017-05-08 03:05 creating active record using no of hashes in rails »
I am getting a no of hashes in my controller which are submitted as part of form data.The form basically contains a list of tasks ie task name ,task t...
(1) odpowiedzi
2017-05-07 23:05 NoMethodError in Books#create »
I'm learning Ruby on Rails and I'm stuck with this problem. I've looked at the other similar problems but did not find a solution that worked for me. ...
(1) odpowiedzi
2017-05-07 22:05 Why do I get an argument error? »
This is copied from Eloquent Ruby book: class Document def words @content.split end def word_count word.size en...
(3) odpowiedzi
2017-05-07 22:05 LoadError: cannot load such file -- roo »
I have been troubleshooting a problem in my Ruby on Rails application for the last 2.5 days. Having used resources online and here on stackoverflow, ...
(1) odpowiedzi
2017-05-07 21:05 obtaining repository name using octokit ruby toolkit for github api »
I'am basically trying to get name of my repository using octokit github api ruby toolkit. I looked at documentation and inside their code files: # Ge...
(1) odpowiedzi
2017-05-07 05:05 rails rspec reflect_on_association error »
I am following this book and working on the order model validation. This is my order_spec.rb: require 'spec_helper' RSpec.describe Order, type: :...
(1) odpowiedzi
2017-05-07 03:05 facing while storing data from a form »
I am finding difficulty while trying to signup .After filling all the fields of the new.html.erb when i am clicking on Register button,i am getting er...
(1) odpowiedzi
2017-05-06 18:05 Errors with alpine linux 3.5 and ruby 2.0? »
I'm trying to Dockerize an old RoR4 app using Alpine linux 3.5 to build a ruby on rails 4 docker image but I'm getting several errors related to ssl. ...
(1) odpowiedzi
2017-05-06 18:05 Ruby Conditional Regex Workaround Method »
I am working on a program that scrapes emails in Ruby, therefore simply using a regex to try to utilize .match(/some regex/) can only be part of the s...
(2) odpowiedzi
2017-05-06 10:05 How populate array of strings to avoid nested loops »
I have to prepare array of strings based on three different set of array objects object1 = ['a', 'b', 'c'] object2 = [1, 2, 3, 4] object3 = ['xx', 'y...
(2) odpowiedzi
2017-05-06 08:05 How do I find licenses of all installed ruby gems? »
For legal needs, I need to document all the installed gems and their licences on our instances. The gem list command lists all the gems. Is there a pr...
(2) odpowiedzi