Category "ruby-on-rails"

Ruby on Rails routes - Query parameter vs id

I'm trying to set a route that accepts a dynamic field. Restaurants have categories [:chinese, :fast_food, :french, :vegan] and the route restaurants/vegan allo

Flash is not displayed in the same view in Rails

I need to display flash in the same view (:edit) after successfully updating an object. If I redirect to another action - everything works correctly. But when I

How can I write this in haml? (rails app)

<a href="/"> <i class="material-icons">file_download</i> Export to CSV </a> I am using a material_icon gem. "file_download" is a do

Modify updated_at attribute through db trigger in rails

I was wondering if there is anything wrong about updating the updated_at attribute of a record through a db trigger in terms of fragment caching (i.e. the parti

Ruby on Rails 6 Gem::LoadError on aws-sdk-s3 gem

I'm new to Rails and following the Ruby on Rails tutorial by Michael Hartl(Japanese ver ed.6), and trying to Deploy on Heroku with image uploading feature using

Use current_user in hotwire partial

Hi I started using hotwire in rails app (currently I am working on adding comments) and I found that partials used for turbo streaming are free of global refere

Getting "jruby: no Ruby script found in input (LoadError)" while running rails application in Rubymine

Apologies if it's a duplicate question. Asking this as I haven't got any solution yet. Trying to run rails application in Rubymine. I have setup the configurati

Ruby On Rails sort the array of hash based on priority

Please help me finding the solution sort by based on priority Im not getting the solution priority based on: 1st pick earliest slot 2nd max rating 3rd cronofy_e

Is there a way to seed a key with a value of an array of strings?

I'm trying to seed some data using an external trivia API. Here's what I have in my seeds.rb file where HTTParty is a gem that parses JSON into a ruby hash: res

Issue with Rails

I ran the command rail new friends After a couple of minutes I get the following error Installing bootsnap 1.11.1 with native extensions Bundle complete! 15 Gem

rails console, rbenv and rbenv-vars issues in ubuntu 20.04

Im experiencing a bizzare issue in ubuntu 20.04. I've installed ruby 3.1.2, rails 6.1.5, rbenv and rbenv-vars. Set up inside the app directory the .rbenv-vars w

Sidekiq - SearchService::Errors::DefaultSearchException

While running Sidekiq I am getting this error: #<SearchService::Errors::DefaultSearchException: SearchService::Errors::DefaultSearchException> This is o

Ruby on Rails - javascript(s) folder and application.js missing

I'm new to Rails and trying to use some Javascript, but everywhere I go I see application.js mentioned, but it's nowhere to be found in my directories. I follow

Error with aws ruby sdk S3: `Aws::S3::Errors::AccessControlListNotSupported`

I've image upload functionality and using active storage with S3. The bucket is private and while uploading image facing issue: Aws::S3::Errors::AccessControlLi

Capybara::ElementNotFound: Unable to find checkbox that is not disabled

I've checked all the SO questions I can find related to this issue. The rest of the form works and the test passes if I remove the validation that a PlanTemplat

Can´t install tiny_tds in Windows 10

When I run: gem install tiny_tds The output tells me that I need FreeTDS installed. Next, it shows me some configuration options and that I'll probably need an

how to get hotel emails from Sabre Rest API

Is there any API I can use to retrieve Hotel Emails info in REST or Soap APIs? I'm using Get Hotel Info in Rest it brings hotel phone and fax number but not hot

Update all existing records with computed value of another field in Rails

class UpdateBrowserLanguageInInsightsVisits < ActiveRecord::Migration[6.1] def change Insights::Visit.update_all("browser_language = Iso639[context[`br

Rails & MySQL on Apple Silicon

has anyone been able to get Rails running with the MySQL via the mysql2 gem on Apple Silicon? I'm working with Ruby 2.5.3 and Rails 5.2.3 but would love to hea

Idiomatic Sass processing in Rails 7

I'm confused about the idiomatic way to process Sass in Rails 7. The README.md for the importmap-rails repo says: This frees you from needing Webpack, Yarn, np