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

Storybook Configuration with Ruby on Rails [closed]

I'm trying to follow the view_component-storybook configuration. I've replicated everything on my windows machine and the static preview pages also work. But the storybook playground doesn't render...

View Article


unknow keyword: :expires_in when deploy Ruby 3.2.2 application to AWS Elastic...

When I try to deploy Ruby 3.2.2 application to AWS Elastic Beanstalk (Platform Ruby 3.2 running on 64bit Amazon Linux 2023), I get below error:[29074] unknown keyword: :expires_in[29074]...

View Article


Ruby debugging will not work in VSCode for any of the debuggers

I am trying to debug a ruby program and cant get the debugger to work for ANY of the debuggers. I have tried rdbg, pry-byebug, byebug and LSP. Every time I try to run the bebugger it says DEBUGGER :...

View Article

Can't find the cause of a has many through association error

I'm building a token provisioning API that enforces quotas. When I try to create a Token, I keep getting the following error, and I cannot figure out...

View Article

Both controller level and Model level metadata simultaneously in the same...

I'm encountering an issue with PaperTrail in my Rails application where I'm trying to store both controller-level and model-level metadata in the versions table, but only the controller-level metadata...

View Article


Ruby Activerecord IN clause

I was wondering if anyone knew how to do an "IN" clause in activerecord. Unfortunately, the "IN" clause is pretty much un-googleable so I have to post here. Basically I want to answer a question like...

View Article

How do I remember where user left in rails

In rails how do I remember which page user left at with user login.When same user comes back he lands on the same page.I am new to rails not sure how I can approach this problem.Is there any gem to...

View Article

How to respond to POST by a Ruby on Rails LTI 1.1 or 1.3 provider? Very...

I'm pretty inexperienced with both stackoverflow and Ruby. Please help me to help you to help me.I'm trying to implement ims-lti in an open-source Rails application. I have created a class and user in...

View Article


Rails: problem with "@hotwired/turbo-rails" and redirects

// app/javascript/application.jsimport "@hotwired/turbo-rails"import "controllers"import "trix"import "@rails/actiontext"import Rails from "@rails/ujs"Rails.start()# config/importmap.rb# Pin npm...

View Article


Capturing all matches of a string value from an array of regex patterns,...

Let's say I have an array of names, along with a regex union of them:match_array = [/Dan/i, /Danny/i, /Daniel/i]match_values = Regexp.union(match_array)I'm using a regex union because the actual data...

View Article

Need to recompile assets in Rails in case of change. How do I get rid of it?

I have a Rails application. Here is the part of the content of development.rbconfig.assets.debug = trueconfig.assets.compress = falseWhen I change any js file, I have to call RAILS_ENV=development rake...

View Article

How to prevent password from being updated if empty in Rails Model and test...

I use Bcrypt gem for password encryption.User model:class User < ApplicationRecord has_secure_password validates :password, presence: true, length: { minimum: 6 }, confirmation: true # ...endHow to...

View Article

Ruby on Rails, threading in DelayedJob workers

I'm working on a Ruby on Rails web project that runs on Puma server, also has several DelayedJob Workers on different servers.The project generates some special logs that i want to send to AWS Sqs...

View Article


SitePrism sometimes finds elements, sometimes doesn't, while Capybara can

I am using Capybara and Selenium for testing my website. I also use with Site Prism for Page Object model. I can make every thing work now, however, I don't understand why sometimes actions with page...

View Article

Equivalent of Python's Counter in Ruby

Python has the Counter class in the collections module. It is a class for counting hashable objects. E.g.:cnt = Counter()cnt['Anna'] += 3cnt['John'] += 2cnt['Anna'] += 4print(cnt)=> Counter({'Anna':...

View Article


troubles with RVM and OpenSSL

Trying to set up a new macbook for a colleague. Not going well. First I install OpenSSL:Heathers-MacBook-Pro:~ heather$ rvm pkg install opensslFetching openssl-1.0.1c.tar.gz to...

View Article

Why can't I wrap Sidekiq.configure_server in Rails after_initialize?

After upgrade to Rails 6 the initializers/sidekiq.rb is causing deprecation warnings about class autoloading. As a workaround I thought I could wrap the contents of Sidekiq.configure_server in...

View Article


Ruby with Postgresql raising NumericValueOutOfRange

I'm trying to do the following query using ruby and pqsql, but when trying a range with more than 1.000 registers I'm receiving an error....user.left_outer_joins(:coverage_radius).where(id:...

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

Model VS Active record in ROR

Can somebody please explain me the difference between model and active record in simple words ?Is active model and model same ?PS: Knowledge regarding these topics will be appreciated.I am newbie and...

View Article
Browsing all 4604 articles
Browse latest View live


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