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

In Ruby's OpenSSL::PKey::RSA class, what does .to_s (aka .export) use as an...

This code returns an encrypted private key:require 'openssl'rsa_key_pair = OpenSSL::PKey::RSA.new(2048)public_key = rsa_key_pair.public_keycipher = OpenSSL::Cipher::AES256.new(:CBC)password =...

View Article


Webpacker error when running server for new Rails app

Just created a brand new Rails app and receiving this error when I run the server:Webpacker can't find application.js in /public/packs/manifest.json. Possible causes:1. You want to set webpacker.yml...

View Article


Problem when trying to Install Chruby, Terminal Issue

I am trying to install and use Chruby to install Jekyll as stated in the Jekyll site. However, when I run the command"source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrcI get...

View Article

rescue-usage within Rails-action without begin

How does this work without the begin-keyword?def show @post = BlogPost.find(params[:id])rescue ActiveRecord::RecordNotFound redirect_to root_pathendWhy isn't it?def show begin @post =...

View Article

Strange timeout with ruby net/http

I am trying to download this file with ruby:https://evs.nci.nih.gov/ftp1/CDISC/ReadMe.txtHere is a sample program, showing the issue (the comment shows what I get):require 'uri'require...

View Article


What is the use of assert_predicate in MiniTest?

I have a problem understanding the usefulness of assert_predicate in MiniTest. How is it different from assert_equal? When would one want to use this assertion? I have came across it many times but did...

View Article

Rails: nested namespace produces a weird path to a partial, resulting a...

I have an ActiveRecord model named Book, and a model named Book::Author. An author has many books through the Book::Authorship model (one-to-many association).Off-topic:In my app only administrators...

View Article

Jekyll build errror on Vercel project

I have a Jekyll website hosted on a Bitbucket repository.And I have a Vercel project that runs that website to generate the static files.Some days ago, it works great, but today it started to fail with...

View Article


Programmatically populating GtkTreeView in Glade created UI

BackgroundI have a photo gallery generator written in Ruby. Configuration for each photo gallery and the generator itself are both in one YAML file. This tool already works in as a terminal tool. Now I...

View Article


Using Ruby on rails temp data [closed]

How to keep the state of the data temporary in ruby on rails project, i.e. using which API and library?I tried session approach but wasn;t as efficient as I wanted. I think by default, session data in...

View Article

Uninitialized constant CustomTokenResponse(NameError) and Unauthorized Access...

I have been trying to migrate my rails app to api and i just installed doorkeeper gem for authentication and it generates me a token for a valid user. Now i have two problems It shows unauthorized...

View Article

Can't connect view to controller on rails guide

Currently following the 7.1.3.2 guide of "Getting Started with Rails" listed on the rails site. I'm struggling with the step of routing a view with an h1 of "Hello, Rails". Server doesn't show the...

View Article

GCC compiler unexpectedly tries to convert LPCWSTR and LPCSTR [closed]

I have an application that I originally worked on on VS 2019 with no issue compiling whatsoever and that would now need to be compiled with GCC. I'm essentially trying to create a Ruby 3.2.0 virtual...

View Article


rails assets pipeline "Cannot allocate memory - nodejs"

we've just upgraded to Rails 3.2.5 from Rails 3.0.7 and using the assets-pipeline compilation on the fly for the staging server, but some times we face this exception !Showing...

View Article

Authentication failure! undefined method `values_at' for nil:NilClass:...

I have rails 5 and ruby 2.7.I want to integrate github login on my systemI have installedgem 'devise'gem 'omniauth-github'gem "omniauth-rails_csrf_protection"I did github config setting in...

View Article


The ruby debug console continues to output strange phrases [closed]

I installed Ruby and debugged the simple code.#<Thread:0x000001cbdeb84858 C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/backport-1.2.0/lib/backport/client.rb:104 run> terminated with exception...

View Article

How to add the web-terminal from Xterm.js library to Ruby on Rails project?

I have a Ruby on Rails project and I need to add a web-terminal to it. I use rails importmap in the project. The problem is that I'm not familiar with frontend and JS and I couldn't find a fine guide...

View Article


cannot load such file --json (LoadError) whenever trying to create a new...

I am trying to create a rails app using: rails new app_nameI am getting the error pasted below. I looked around but haven't been able to find a solution.I am on linux if that matters. Going to install...

View Article

How to pass keyword parameter to ruby rufus scheduler?

I am learning about redmine. I am trying to receive email with rufus scheduler as explain here...

View Article

how can we use model object method in rails select query

I have two models, first one is User with attributes first_name, last_name and second one is Organization with attribute partner_level which is enum {standard: 'standard',standard_plus:...

View Article
Browsing all 4607 articles
Browse latest View live


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