Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Browsing all 4607 articles
Browse latest View live
↧

Change default size of text input in Simple Form

How can I change default size of SimpleForm inputs using initializer? I would like to treat as string all text fields too by default. So I want an input to have text size only when explicitly setting...

View Article


What might explain an "invalid stored block lengths" error?

I am running a Rails (3.2.3) application with Ruby 1.9.3p194 on the basic Ubuntu lucid32 image in a Vagrant virtual box. The virtual box is running on Leopard, for what it's worth. I'm trying to use...

View Article


How can I fix "Unknown enum attribute" after Rails 7.1 upgrade?

Hi I have this Company model with the following enum that works fine for rails < 7.1class Company < ApplicationRecord enum auth_type: { password: 'password', magic_link: 'magic_link', google:...

View Article

'puma: command not found' error after updating ElasticBeanstalk platform

I have a ruby 3.2.2 project running on aws eb with Ruby 3.2 running on 64bit Amazon Linux 2023/4.0.0 platform and everything is working. I'm trying to upgrade the platform version from 4.0.0 to 4.3.1...

View Article

Securing a client-side API

I'm building a server-side API and client-side library for a JavaScript-based game where two very important features must be secured.A user must be debited for each playWe must ensure that the score...

View Article


Image may be NSFW.
Clik here to view.

Strange bundle update issue: disappearing net-pop (0.1.2) dependency

I have a strange bundle update issue with the dependency of net-pop.I manually updated all gems via bundle update GEM. Everything works so far. My CI builds and tests jobs are green.But:When I now run...

View Article

Ruby on Rails, How to make a controller render different page without redirect?

Let's say we have the following pagesclip/show/111image/show/222sound/show/333where 111,222 and 333 are the IDs for different contributionsI developed a new controller called "show" that will detect ID...

View Article

Ruby & IMAP - Accessing Office 365 with Oauth 2.0

So MS disabled IMAP for basic auth as we all know.I am trying to figure out how to get the OAUTH 2.0 working using ruby (not ruby on rails).I have Azure APP and everything needed (I think), but I can...

View Article


How do I add data to a Google Sheet from Ruby?

There's a Ruby Quickstart guide in Google's developers site, but it only demonstrates how to get data from a spreadsheet, not adding data to it.Is there some easy example out there explaining how to do...

View Article


Ruby on Rails Production with Heroku: Asset Precompile issue

I have an issue with the asset precompilation error when trying to push my app to Heroku.ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in block (2 levels) in...

View Article

Custom Rails Validation (Doesn't seem to be working)

I've got the following Model for Accountsrequire 'net/http'require 'uri'require 'date'class Account < ActiveRecord::Basevalidates_presence_of :username, :password, :on => :updatevalidate...

View Article

Could not find the 'Cropper' processor in any of these paths: lib/paperclip,...

I had to include the paperclip_processors directoryI get cropper processor not found error. I follow railscast and doing exactly like thatmodule Paperclipclass Cropper < Thumbnaildef...

View Article

run bundler on multiple gemspec files in one run

I have many small projects on the go. Most of the configuration of these is the same. But usually there is an extra gem I need for a particular project. I am currently maintaining the Gemfile...

View Article


Trying to connect to an API for IGDB

I've been trying to connect to an API for a Project in school. I'm currently using Ruby. I'm trying to connect to the API for IGDB and display video games and I just cannot. I've been getting nothing...

View Article

JRuby-1.7.19 UDPSocket "initialize: name or service not known" while scanning...

In my programming I'm scanning an IP range for devices that respond to snmp. I'm iterating through a list of IP addresses and putting each on into it's own thread and using the ruby gem snmp to test if...

View Article


Ruby console input halting at 1024 characters

I have a script that takes console input into a variable and requires pasting in a string longer than 1024 characters.When I try to paste more than 1024 characters it stops accepting input after 1024...

View Article

Rails and Stripe Line Items

I've integrated Stripe Tax into my application but I can't get past an error when I try to loop my line items (products) into the code for the Tax Calculation. It DOES NOT give me an error if I do the...

View Article


Running into Heroku's slug size limit after Ruby and Rails update

I am working on updating my Ruby and Rails to the next minor release (3.3.0 from 3.2.2 and 7.1.2 from 7.0.8 of Ruby and Rails respectively), but am running into Heroics slug size limit. I am apparently...

View Article

wrong number of arguments (given 0, expected 1..2)

I am trying to implement a feature of join event and cancel event. I have already created attendances table and include status as attribute. The relation is many to many to so in my attendance model...

View Article

RubyOnRails use .where query with has_one - belongs_to relationship

Should i always use plural model name when using .where query with has_one relationship?My modelsclass User < ApplicationRecord has_one :roleendclass Role < ApplicationRecord belongs_to...

View Article
Browsing all 4607 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>