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
604 views
1 answer
    I had a test that did this: expect(@parser.parse('adsadasdas')).to raise_error(Errno::ENOENT) and it didn' ... we use parentheses with expect? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
457 views
1 answer
    Say I have two versions of a gem installed (somegem versions 0.10.6 and 0.10.5) and I want to run the ... how to do it from the commandline. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
692 views
1 answer
    I'm writing an app that keeps track of school classes. I need to store the schedule. For example: ... production and SQLite for development. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
661 views
1 answer
    Update: this question was asked before there was a solution for it already in ActiveAdmin. As Joseph ... (ActiveModel::ForbiddenAttributes) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
598 views
1 answer
    I'm struggling to find a comparison of includes() and preload() for ActiveRecord objects. Can anyone explain the difference ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
730 views
1 answer
    You can dynamically define a class method for a class like so: class Foo end bar = %q{def bar() "bar!" end ... this as well. Thanks in advance. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
888 views
1 answer
    I am trying to run rspec for Ruby on Rails. I am running Rails 4.1.1. I have installed the gem, have ... so that I can start running tests? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
668 views
1 answer
    Whenever I do bundle install all of the gems get installed at app_dir/vendor/bundle path and consumes loads of ... bundle or a default place. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
530 views
1 answer
    I'm using paperclip in a rails app and have the following three validations in my model validates_attachment_presence ... not attached a photo. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
682 views
1 answer
    How can I go about making my routes recognise an optional prefix parameter as follows: /*lang/controller/id ... lang.resources :stories end See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
528 views
1 answer
    I'm trying to solve questions from Project Euler in Ruby one-liners, and I'm curious if there's a more ... out. Semi-colons are not allowed! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
454 views
1 answer
    By default gitlab has the next configuration in gitlab.yml : email: from: [email protected] host: gitlabhq.com but, ... server. How I do that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
833 views
1 answer
    When running my specs with rspec & capybara, it can't find capybara's visit method. Is there another ... have_content("elephants") end end See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
543 views
1 answer
    I'm using devise for authentication and have some before_filters in my application controller. Issue I'm seeing is ... or some other file? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
440 views
1 answer
    TL;DR Don't bother with gemsets; multiple versions of a gem may be installed concurrently. When necessary, specify ... 't there a better way? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
597 views
1 answer
    I have two instances of my app: one for development, one for production. My development database is called ... work on my production database? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
508 views
1 answer
    What is the meaning of *nix, and what is its relation with Ruby? Just saw that in an interview question. ... the question was about Ruby. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
854 views
1 answer
    I'm working on a Rails application using HTTParty to make HTTP requests. How can I handle HTTP errors ... refused and timeout errors. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
675 views
1 answer
    How do I turn a string into a class name, but only if that class already exists? If Amber is already a class, ... errors? Too ugly? I agree...) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I am using the following code for my routes: devise_for :user, :as => '', :path_names => { :sign_in => " ... root path to be to :sign_in action? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
701 views
1 answer
    I have this hash: h => {"67676.mpa"=>{:link=>"pool/sdafdsaff", :size=>4556}} > h.each do |key, value ... values in the value hash on the loop? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
580 views
1 answer
    If I wanted to do something like this: collection.each do |i| return nil if i == 3 ..many lines ... stop iteration of the remaining elements. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
430 views
1 answer
    The Factory Girl introduction delineates the difference between FactoryGirl.build() and FactoryGirl.create(): # Returns ... the other? Thanks! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
521 views
1 answer
    I'm trying to overwrite a getter method for an ActiveRecord model. I have an attribute called name in the ... normally like this: @category.name See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
742 views
1 answer
    When writing RSpec tests, I find myself writing a lot of code that looks like this in order to ensure that a ... 's not exactly what it does. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
715 views
1 answer
    I've got a model with its validations, and I found out that I can't update an attribute without ... attribute without validating the model? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
578 views
1 answer
    How do I count the number of days between these two dates? start_date = Date.parse "2012-03-02 14:46:21 +0100" ... 2012-04-02 14:46:21 +0200" See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
637 views
1 answer
    We recently began a compliance push at our company and are required to keep a full history of changes to ... is still relatively unobtrusive? 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

...