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

Is there a version of ruby serialport which will install on an Apple Silicon...

I need to run a Ruby script that someone else wrote a while ago, on my MacBook. It was built with ruby 3.0.2 and uses serialport-1.3.2.Ruby 3.0.2 won't install. I was able to install 3.1.6 and 3.4.1...

View Article


'development' database is not configured

I am getting this error while doing rake db:migrate of newly cloned app.'development' database is not configured. Available: ["production"]So after reading the error, I am doing RAILS_ENV=production...

View Article


unable to install particular version of mini_racer gem

I am trying to set up my local environment for a particular repository when I came across this error.An error occurred while installing mini_racer (0.1.15), and Bundler cannot continue.Make sure that...

View Article

Ruby Sketchup ... exit

The following script is executed within Sketchup as a ruby script.notepad = File.absolute_path("notepad.exe", "C:/Windows")puts "fileName :"+notepadexec((notepad))When closing the notepad.exe windows...

View Article

What do Ruby GUI SketchUp developers use to build SketchUp software?

I couldn't find any enterprise level desktop application which is built on Ruby. I know only Sketchup built with Ruby. What do Ruby GUI SketchUp developers use to build SketchUp software? I'm also...

View Article


How to reload a variable defined by let

A user has many comments, so I would like to have a factory user with a comment associated to it (user_with_comment):factory :user, class: User do |t| ... factory :user_with_comment do |t|...

View Article

How to fix the error for a Ruby on Rails project occurred after running...

When trying to run bundle install to install missing gems for a rails project. It is throwing the error below-An error occurred while installing mysql2 (0.5.6), and Bundler cannot continue.In...

View Article

How do I run only before or after callbacks on an active record?

Lets say I have the following classclass Foo < ActiveRecord::Basebefore_save :before_callback_1, :before_callback_2, :before_callback_3after_save :after_callback_1, :after_callback_2,...

View Article


Problem creating Issue with jira-ruby Gem

I am testing out using jira-ruby and creating an Issue in Jira. However, when I attempt to create an issue, I receive this...

View Article


Ruby 3.4.1 Configuration Failed on MacBook M1 Max with Sequoia 15.2 – Issue...

I have a MacBook with an M1 Max chip running macOS Sequoia 15.2, and I'm encountering an issue during the installation of Ruby 3.4.1. The error message states: Configuration of Ruby 3.4.1 failed!When...

View Article

Image may be NSFW.
Clik here to view.

How to fix "Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5"...

I am getting this error while running server, how do I fix this?

View Article

How to install ruby on Mac using rbenv?

My problem is ruby -v is not showing the ruby version that I installed (3.0.0).I installed ruby using following commands using homebrew/bin/bash -c "$(curl -fsSL...

View Article

Simple Table of Contents in Rails is not working as intended

I had this thought of a simple Table of contents in Rails. I have created a new Rails 8 app, worked. I installed action text. Scaffold'ed out a post model with title and body. Body has the rich text...

View Article


Replace square brackets with parentheses in Ruby

I am using Ruby 1.9.I have a array [1,2,3].I need to convert it to a format ('1', '2', '3') in order to apply it inside SQL queries (IN Statements) and the database is MySQL.

View Article

hiding system command results in ruby

How easy is it to hide results from system commands in ruby? For example, some of my scripts runsystem "curl ..."and I would not prefer to see the results of the download.

View Article


Dependabot for big Rails project times out

Running dependabot on Github on our large Rails project times out (the job is killed after 55 minutes).Our Gemfile has 176 gems, 151 which use the ~> operator, so Dependabot will try to upgrade...

View Article

Turbo Stream broadcast error in Rails 8.0.1

I have a new Rails 8.0.1 appIn an index.html.erb page I code:<%= turbo_stream_from "test" %><div id="message"><p>hello</p></div>In server output everything seams...

View Article


Rufus scheduler in Sinatra

I'm using Rufus scheduler in a Sinatra app. Can I access helper methods from within "scheduler do" block? I didn't manage to do it (I get an "undefined method `check' for main:Object" error) so now I...

View Article

Why ActiveRecord::Store.store_acessor doesn't reflect on the resulting SQL...

Consider this class:class UsersMigration < ActiveRecord::Migration[5.2] def change create_table(:users) do |t| t.hstore :settings end endendclass User < ActiveRecord::Base store_accessor...

View Article

Rails: Unpermitted parameters: :authenticity_token, :order, :commit. after...

I am upgrading a functional app from Ruby 1.8.7 Rails 3 to Ruby 3 Rails 7: quite a journey and I am almost finished. But I have an order process, which is not running after the upgrade and is difficult...

View Article
Browsing all 4619 articles
Browse latest View live


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