Data dodania Pytanie
2017-12-10 20:12 undefined method `comments_count' for Article in Ruby on Rails guide »
I am new to Rails. I followed the Getting Started Guide of Rails 5.1.4 to put up a blog. My articles/index.html.erb template file reads like this: &...
(2) odpowiedzi
2017-12-10 17:12 Cache Graph for Ruby on Rails »
Do you know any Ruby gem or library that implements cache with dependency graph? I'm looking for a solution for organizing cache objects to a graph st...
(0) odpowiedzi
2017-12-10 06:12 create non-persistent cookie in sinatra »
I want to use non-persistent cookies in a Sinatra app, i.e. a cookie that is deleted by the browser at the end of the session. My understanding is tha...
(0) odpowiedzi
2017-12-10 05:12 `FileUtils.mv` fails if run directly after `system('openssl ...')` on a file this just created »
I have this code: ... system("openssl ... -in #{path.shellescape} -out #{tmpfile.shellescape} ...") FileUtils.mv(tmpfile, path) ... path is "random...
(1) odpowiedzi
2017-12-10 02:12 How to remove or replace vulnerable gem dependencies? »
I have an app I developed a couple of years ago with some dependencies in Gemfile.lock that are now security vulnerabilities, but when I run bundle up...
(2) odpowiedzi
2017-12-09 23:12 undefined method `full_title' Hartl Rails Tutorial »
Hi I'm learning from the tutorial of mihaela hartla I know that was similar topic but i the method still does not work So, I keep getting the the err...
(3) odpowiedzi
2017-12-09 19:12 Ruby: how to count the frequencies of the letters »
HELP: do a frequency method: calculate the frequency each letter appears in “str” and assign the output to “letters”. The method should count...
(2) odpowiedzi
2017-12-09 04:12 Kaminari pager not working with Sinatra and Mongoid? »
Can't get Kaminari to work with Sinatra and Mongoid. I'm getting this error: NoMethodError at /api/events undefined method `page' for #<Mongoid::...
(0) odpowiedzi
2017-12-09 01:12 js or-equal operator equivalent as in ruby »
In Ruby, I can do the following: very_long_dictionary_name = {} very_long_key_name = "a" # this code usually will run inside a function invoked twic...
(2) odpowiedzi
2017-12-08 21:12 Sinatra - values disappearing between route and view »
I am using jquery / ajax to pass into a route two variables (from a slider), min and max. At this point I just want the values and while I can see th...
(0) odpowiedzi
2017-12-08 17:12 Rails- Gem chartkick - Remove axis values from bar_graph »
I have added a bar_chart using gem chartkick in my rails application and don't want to show axis labels and values. Want to show colored lines only. M...
(0) odpowiedzi
2017-12-08 17:12 Grepping Ruby hash for regex not working as expected »
I have a hash with this data: {"ENABLED"=> [#<Details:0x00007f910e946848 @context="ELP", @instance="a1", @side="blue", @status="ENABLED", @vm="...
(2) odpowiedzi
2017-12-08 14:12 Rails: ActionController::Parameters#delete returns the value instead of key-value pair? »
According to Rails API ActionController::Parameters#delete Deletes and returns a key-value pair from Parameters whose key is equal to key. If the ...
(0) odpowiedzi
2017-12-08 14:12 Rails rake index task »
I'm trying to rake the following index task namespace :search_suggestions do desc "Generate search suggestions from items" task :index => :env...
(1) odpowiedzi
2017-12-08 10:12 Access java classes inside .jar in Jruby »
I am currently developing my Jruby application which is contained inside a .jar file. Within the jar, my file structure looks like this: lib/launch....
(1) odpowiedzi
2017-12-08 07:12 How to search values in array output? »
I have output like this in array form: {:compartmentId=>"osdaa", :displayName=>"server1", :id=>"dffdssa", :lifecycleState=>"AVAILABLE", ...
(1) odpowiedzi
2017-12-07 23:12 How do I share Redis key/values across multiple instances with rackup/Sinatra? »
I'm trying to use Redis as my session store, which seem to work just fine. However I can't figure out how to let multiple instances of Sinatra access ...
(0) odpowiedzi
2017-12-07 23:12 threaded variable propagation / inheritance »
I'm trying to communicate information to all child threads but not sibling threads. For example. If I am starting a threaded background job, I want to...
(0) odpowiedzi
2017-12-07 18:12 Errno::ENOENT No such file or directory @ rb_sysopen ruby on rails »
I have the following problem I get read error There is no such file or directory @ rb_sysopen - abc.txt I marked it in the following line File.foreach...
(0) odpowiedzi
2017-12-07 17:12 Generate a Key, Value JSON object from a Ruby Object Array »
I have a Ruby array of students. Student class has attributes id, name and age. students = [ {id:"id1",name:"name1",age:"age1"}, ...
(3) odpowiedzi
2017-12-07 14:12 Rails: Catch a request in a scope when the request doesn't match anything in the scope »
Let's take the following router : Rails.application.routes.draw do scope ":locale", locale: /en|nl/ do get "/:slug", to: "pages#prefixed_actio...
(2) odpowiedzi
2017-12-07 14:12 Rails 5: Jquery autocomplete »
I have implemented the jquery autocomplete within my rails app. And this is the setup: //= require jquery //= require rails-ujs //= require jquery-u...
(0) odpowiedzi
2017-12-07 11:12 Date failing to update, but returning true for Update (Rails ActiveRecord) »
I have a Rails model called user that has a birthday field with type date in Postgres. My first issue is that I'm not sure how to update the value of...
(1) odpowiedzi
2017-12-07 08:12 import class file in Jruby »
I have several scripts written in Jruby that I would like to obfuscate by converting them to .class files. But I am running into an error when I tried...
(1) odpowiedzi
2017-12-07 07:12 How to use Ruby Sinatra + ActiveRecord to read .sql file and extract the content? »
I'm familiar with Sinatra but I am completely new to ActiveRecord and Database stuff, I'm trying to use ActiveRecord from a .sql file full of data wit...
(0) odpowiedzi
2017-12-07 01:12 How to verify that the invisible_captcha is actually working well? »
I'm using https://github.com/markets/invisible_captcha for my app on Heroku. How can I verify that it's actually working? Is there a way to simulate a...
(0) odpowiedzi
2017-12-06 20:12 how do i save large amount of data into DB using DataMapper »
Im trying to insert into the database but sinatra throws this error DataObjects::ConnectionError at / database is locked at line Name.create(babyna...
(0) odpowiedzi
2017-12-06 18:12 Enumerator's loop magic (No break and no endless loop at the same time) »
Good day. Short question How do loop inside a Enumerator.new knows where to stop?. Now more descriptive example. Here are tow snippets of code both...
(1) odpowiedzi
2017-12-06 17:12 paperclip resize not working for dynamic columns on attachment model »
I have a two columns on my attachment model on which the user sets the dimension to which they want to resize the image. However, the variables when ...
(0) odpowiedzi
2017-12-06 16:12 Ruby Rest-client keeps correcting the uri »
I'm using rest-client to make a post request to a certain address. Unfortunately rest-client keeps correcting the web adres from 'https' to 'http'. Wh...
(1) odpowiedzi
2017-12-06 16:12 Rails 5 - Unable to Cleanse Test DB »
I've recently started testing my app using RSpec. Being the testing noob that i am, i did not install the full suite of tools that people normally use...
(1) odpowiedzi
2017-12-06 16:12 Rails 5: carrierwave gem delete single attachment »
I'm using the the carrierwave gem with my rails app in order to upload multiple images(attachments). The attachments are being saved inside the item ...
(0) odpowiedzi
2017-12-06 16:12 Oj gem: incompatible library version »
I'm trying to start up an application in localhost made it with Sinatra and after running bundle install I got the following error: /home/diego/.r...
(1) odpowiedzi
2017-12-06 15:12 Rails: "except" vs "slice" to take out certain parameter? »
I am trying to create a class instance with one particular key extracted out and save for later consider this is the type of param: Parameters: {"p1...
(2) odpowiedzi
2017-12-06 09:12 ConstraintException does not raise in rspec »
I want to write a test that handles FOREIGN KEY constraint error when deleting a record, but ConstraintException is not raised. the table's schema li...
(1) odpowiedzi