Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged RUBY

0 votes
648 views
1 answer
    I have a rails 3.1 app that creates pdf documents using pdfkit, and everything works as specified, except for the fact ... :media => "all" %> See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
895 views
1 answer
    Right now, I do a get '/' do set :base_url, "#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']} ... . How do you get your base url? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
622 views
1 answer
    Is there a way to "reload" or "refresh" a rubygem in memory? As i'm playing in irb, occasionally I like to ... a better way...what is it? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
577 views
1 answer
    I have an array of objects [<#a star=1 val=1>, <#a star=nil val=3> , <#a star=2 val=2>] i ... |a| a.starred }.reverse @answers=starred+@answers See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
632 views
1 answer
    Basically I have a structure that used to work perfectly in 3.0.x and now it breaks with undefined variable ... , I'd love suggestions. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
729 views
1 answer
    If I try to execute the following code: hassle = rota.hassles.create(:sender => user1, :receiver => user2, :type = ... it, I get an sql error. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I am trying to get factory girl to run with rspec in my rails 4.1.1 app. Problem is when I run ... are supposed to get loaded automatically. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
667 views
1 answer
    Trying to use MySQL for rails app and downloaded it from dev.mysql.com. After successfully installing the package ... get Mysql up and running. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
667 views
1 answer
    Complete new person to Ruby and Rails here... Have tried some tutorials in the past, but that's about it. I'm ... . Thank you all for your help! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
835 views
1 answer
    I have an edit form in erb. <%= form_for @animal do |f| %> Within the code I have a select with options ... course that is not a viable option. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
530 views
1 answer
    Sometimes it's more convenient to print in <%%>. How to do it in Rails? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
540 views
1 answer
    I want to find all items created in a given week, and pass in a week number param. (created_at is a ... and end_of_week in the scope.) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
676 views
1 answer
    My application (Ruby 1.9.2) may raise different exceptions, including net-connection breaks. I rescue Exception ... Prints: Errno::ECONNRESET 3 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
815 views
1 answer
    I am trying to install Bundler on my VPS using Ansible. I already have rbenv set up and the global ruby is 2. ... Why can't bundle be located? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
793 views
1 answer
    I'm using Redis in my application, both for Sidekiq queues, and for model caching. What is the best way ... are greatly appreciated. Thank you! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
537 views
1 answer
    A bad side of pushing to Heroku is that I must push the code (and the server restarts automatically) before running ... .and I have no downtime! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
489 views
1 answer
    I have array of words and I want to get a hash, where keys are words and values are word count. Is there any ... [word] += 1 } return result See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
570 views
1 answer
    What's the difference between find, where and find_by_id? They all work when you try to find a user given an ID. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
489 views
1 answer
    I have a bunch of code to look at, and now it is debugging time. Since I have never been a fan of Ruby's debugger ... : I'm using Ruby 1.8.7. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
445 views
1 answer
    Ok steps to reproduce this: prompt> rails test_app prompt> cd test_app prompt> script/generate model event_service ... I doing something wrong? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I have three classes: School, Account, and Administratorship. School has_many :administatorships has_many :administrators ... elegant solution. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
465 views
1 answer
    I installed Sphinx and Thinking Sphinx for ruby on rails 2.3.2. When I search without conditions search works ok. ... 's going on? Thanks, Brian See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
517 views
1 answer
    Is there an easy way to log all method calls in a Rails app? My main use for this would be in testing (and in ... rspec with the '-b' option). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
443 views
1 answer
    require 'net/http' urls = [ {'link' => 'http://www.google.com/'}, {'link' => 'http://www.yandex.ru/' ... way to do it? Is Fiber suited for that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
603 views
1 answer
    Can anyone figure out what's going on here? I was able to get my code to work the way I want ... how validates_associated is supposed to work? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
471 views
1 answer
    UPDATE 9th june 2012: Setup with mongoid 3.0.0.rc at heroku, see this gist: https://gist.github.com/2900804 ... mind create the tag 'mongohq'? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
471 views
1 answer
    I am using Formtastic 2.1.1 in Rails 3.2 (with Active Admin) and I want to insert a row into my ... Has anyone done this with Formtastic before? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
589 views
1 answer
    I have a question regarding using rack-mount with Sinatra. I've got two classic-style Sinatra apps. Let's call ... a better solution than that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...