Ruby is an open-source dynamic object-oriented interpreted language created by Yukihiro Matsumoto (Matz) in 1993.
0
votes
1answer
11 views
How to handle gemset
I am new to Rails. Each time I open a new terminal in Linux, it tells some gem is missing. But I have installed the gem in the same folder already in different terminal. So could anyone please advise ...
1
vote
0answers
12 views
how to call method in one application from another application in ruby on rails
I want to call the method and get the response in my application from another application in Ruby on Rails technology, but here cross site scripting problem is there. so, i can i resolve this issue ...
-3
votes
1answer
16 views
undefined method `name' for “aaronh-chronic”:String
Im getting this error on bundle install
undefined method `name' for "aaronh-chronic":String (NoMethodError)
rail version 2.3.14
0
votes
0answers
9 views
how to have a variable that will available to particular scheduled task whenever it runs again after some time?
I am starting many scheduled jobs at the same time using rufus scheduler. I want a variable in that code that will be available to only that scheduled job, when it runs again after some time.
...
-1
votes
1answer
27 views
How do I turn a hash which looks like this { { { } } } into one that looks like this { { [ ] } }?
So this is the code I'm using:
@department_hash = {}
department.css('li').each do | department |
department_title = department.css('.refinementLink').text
department_count = ...
0
votes
0answers
6 views
Ruby Tire Gem & Curl::Err::ConnectionFailedError:
I've got quite a lightweight Rails application on a decent size server (32gig), I'm using Sidekiq to manage my queues and everything works fine until I start hitting around 200 writes per second, then ...
0
votes
0answers
4 views
how to test the result of applying a puppet template to given test parameters
I have the following puppet template file solr.json.erb:
{
"servers" : [ {
"port" : "<%= jmx_port %>",
"host" : "localhost",
"queries" : [
<% @markets.each do |market| ...
0
votes
1answer
19 views
Find votes by current user on a post
i'm building an application where users can submit posts and vote on them.
I need to find a way to allow users to delete their vote.
I started a private method called correct_user under my ...
2
votes
0answers
33 views
Installing RVM access to /etc/passwd
I tried to install RVM, like:
\curl -L https://get.rvm.io | bash -s stable
However it failed with error message
Error checking user shell via /etc/passwd - make sure this file is
world ...
0
votes
0answers
45 views
ActiveRecord simple query crashing server
I have a simple query that for some reason is hanging, causing heroku to hit max memory, and crashing the server. I have never seen this behavior before so I am looking for suggestions on what might ...
1
vote
1answer
16 views
Bundler::GemNotFound Error
I'm using Ubuntu. I tried installing bundler via 'gem install bundler', and it seems to have worked. In terminal, if I type 'gem list', I see bundler 1.3.5 in the list. However, if I run 'bundle ...
0
votes
0answers
7 views
Capistrano deploy:cleanup with multiple instances
I've tried several iterations of being able to run cap deploy:cleanup with multiple instances, but nothing seems to work in this case. My deploy.rb looks like
hosts=ENV['hosts'].split(',')
hosts.each ...
-1
votes
2answers
34 views
Access attributes of another model in view
I have a controller A (of a model AA) and in it
def view_name
end
and a model B with:
def attributes {
:a => 'xyz';
}
end
How do I access the attribute :a inside the view of controller ...
0
votes
2answers
27 views
How to show user.name associated with timesheets?
I am having issues with an app displaying the user.name in a timesheets index (shows all timesheets, not just current user timesheets)
User model:
# Table name: timesheets
#
# id :integer ...
2
votes
1answer
35 views
How can I group by the difference of a column between rows in SQL?
I have a table of events with a created_at timestamp. I want to divide them into groups of events that are N seconds apart, specifically 130 seconds. Then for each group, I just need to know the ...