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

Rails 7 devise gem can't login with valid credentials after some days

Rails 7Devise 4.9.4 (with bcrypt (~> 3.0))User can't login error raised "Invalid Email or password."User reset password and can login with new password after some days he/she can't login again have...

View Article


Recursive globs. ** or */** globstar different on zsh, Bash, Python, and Ruby

Suppose you have this directory tree:$ tree /tmp/test/tmp/test├── dir_a│  ├── dir a\012file with CR│  ├── dir a file with spaces│  └── sub a directory│  └── with a file in it├── dir_b│  ├── dir...

View Article


pod --version error can't satisfy 'rexml (~> 3.2.4)', already activated...

when I run the pod --version command, I keep getting these error messages./opt/homebrew/Cellar/ruby/3.3.5/lib/ruby/3.3.0/rubygems/specification.rb:1411:in `block in activate_dependencies': can't...

View Article

How to write to file in Ruby?

I need to read the data out of database and then save it in a text file.How can I do that in Ruby? Is there any file management system in Ruby?

View Article

Notifications_count problem with the noticed gem

"I'm currently using the noticed gem for notifications, and I'm encountering the following problem:undefined method `notifications_count=' for #<AppointmentNotifier id: nil, type:...

View Article


Ruby on Rails : how to test a controller?

I'm learning Ruby.I'm now trying to test one of my controller.My test file is myapp/test/testing.rb while my controller is located at myapp/app/controllers/test_controller.rb.The content of testing.rb...

View Article

Ruby - Evaluate escaped interpolated sections in a string

I feel like this should be obvious but I'm having a mental block. Using Ruby, let's say that I have a string which might or might not contain some escaped string-interpolation segments, like this:s1 =...

View Article

Uninitialized constant Admin::Admin

Using Ruby: 2.3.1p112 and Rails: 3.2.12I'm trying call a demo method in my controller. So, in my _form.html.erb I have:<%= link_to 'Demo', "/admin/clinics/"+@clinic.id.to_s+"/demo" %>In my...

View Article


Routes.rb doesnt define constant Routes

I am a SysAdmin working Redmine. We are upgrading our system and trying to get the older pluging Redmine_out_of_band_authentication to get an email with with a verification code working.Before someone...

View Article


Ruby on Rails Multi-lingual multi-tenant thread problem

We have a Ruby on Rails application that has the concept of multiple brands / multiple domains. The look and feel changes based on the requested domain. In addition, the site currently supports two...

View Article

Checking if a variable is not nil and not zero in ruby

I am using the following code to check if a variable is not nil and not zeroif(discount != nil && discount != 0) ...endIs there a better way to do this?

View Article

Configuration issues trying to install Ruby on Mac

When I run rvm install ruby-1.9.3, I get this error message when configuringError running ' ./configure --prefix=/Users/robbor911/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc...

View Article

How to compile Ruby?

Is there a tool that can allow me to compile Ruby code so that it runs somewhat faster? For example, I have heard that there is a tool for Python called "pyc" that allows us to compile the code, so...

View Article


No such file or directory @ rb_sysopen

I'm using Ruby 2.1.1 When I run this code: <CSV.foreach("public/data/original/example_data.csv",headers: true, converters: :numeric) do |info|I get an error:No such file or directory @ rb_sysopenIt...

View Article

How to enforce Ruby code to break long lines with multiple arguments into one...

I'm currently using RuboCop in a Ruby on Rails project, and I have a question regarding code style enforcement for long lines with multiple arguments. We have set a line length maximum of 100...

View Article


SSL Certificate Verification Failed for Fastlane Play Store JSON Key Validation

Its on Macbook.I'm using Fastlane to validate my Play Store JSON key, and I suddenly started encountering an SSL certificate verification error. The command I’m running is:fastlane run...

View Article

How to prevent HTML entities in query parameters from being escaped when...

I'm working on a Rails application where I need to sanitize user inputs, including URLs, using ActionController::Base.helpers.sanitize. However, when sanitizing URLs that contain query parameters (such...

View Article


Linking Ruby with HTML Code

I am aware that you can implement Javascript code to an HTML documents, by inserting the code between the <script></script> tags.. is there a similar way to do this with Ruby?

View Article

error connecting external database with rails

Guys im trying to connect my application to an external database to consume it.I ad the config in database.yml at the end of file.external_db: adapter: postgresql encoding: utf8 database: db_name host:...

View Article

Unable to install Ruby 2.1.5 on Ubuntu 22.04

I need to work on a legacy project which the ruby version in it doesn't seem to be in the rvm repository for my release of Ubuntu (22.04).when I try: rvm install 2.1.5, I get:No binary rubies available...

View Article
Browsing all 4612 articles
Browse latest View live


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