Skip to main content

Questions tagged [ruby-on-rails-7]

For Ruby on Rails 7 questions: Ruby on Rails 7 is a web app framework in Ruby. Use tags like [ruby-on-rails], [ruby], [rails-7], [activerecord], [actionview], [actioncontroller], [routing], [authentication], [authorization], [database], [testing], [deployment], [gems], [api], etc. Provide specific details and errors.

46 votes
4 answers
34k views

How to add custom JS file to new rails 7 project

I created new rails 7 project rails new my_project and have a problem to include my custom JS file to be processed by rails. my "javascript/application.js" import "@hotwired/turbo-rails&...
pa3k's user avatar
  • 821
15 votes
5 answers
11k views

How to call confirm prompt using button_to in Rails with Turbo

Previously in Rails when using the button_to tag, it was possible to use a confirmation dialog like this <%= button_to 'Destroy', @post, method: :delete, data: { confirm: 'Are you sure?' } %> ...
mechnicov's user avatar
  • 14.7k
40 votes
2 answers
21k views

Could not open library 'vips.42'; Could not open library 'libvips.42.dylib'

When upgrading from rails 6 to rails 7, and running some ActiveStorage methods locally, I see: Could not open library 'vips.42': dlopen(vips.42, 0x0005): tried: 'vips.42' (no such file), '/usr/local/...
stevec's user avatar
  • 48.4k
25 votes
3 answers
20k views

Error: Form responses must redirect to another location

I need to render an html code I receive from an API. In Rails 6 : I was doing this in my controller, and it was working fine. I called the webservice I received the response, and I was redirected to ...
user15829831's user avatar
23 votes
1 answer
11k views

Rails 7 Dynamic Nested Forms with hotwire/turbo frames

I'm very new to Rails. I've started right from Rails 7 so there is still very little information regarding my problem. Here is what I have: app/models/cocktail.rb class Cocktail < ApplicationRecord ...
zdebyman's user avatar
  • 640
17 votes
4 answers
23k views

How to install jQuery and bootstrap in rails 7 app using esbuild (without webpacker)

I'm trying to create a rails app by installing bootstrap and jQuery. First I tried to create using rails new name--css bootstrap But its not working. So I did it with it manually. I tried also using ...
Ronats's user avatar
  • 329
16 votes
3 answers
12k views

Rails UJS not firing with Rails 7

I upgraded my Rails application to Rails 7. I know that Turbolinks and Rails UJS actually are replaced by the Hotwire combination of Stimulus and Turbo in Rails 7, but I wanted to know whether I can ...
sam's user avatar
  • 231
6 votes
1 answer
2k views

In rails, Turbo just appends the response from the server at the end of current page

The problem: Turbo just appends the response from server to the end of current page. Not replacing the page like expected. Recently upgraded from Rails 6 to 7. Also I switched from importmap to ...
JUlinder's user avatar
  • 1,045
5 votes
1 answer
4k views

How to have a delete link respond to turbo_stream and html in Rails 7?

I have a delete link in Rails 7 that functions correctly using either turbo_stream or html, but not each of those. link_to 'delete', @object, data: { turbo_method: 'delete', turbo_confirm: 'Really?' } ...
hellion's user avatar
  • 4,790
11 votes
6 answers
8k views

Rails 7 asset pipeline SassC::SyntaxError with Tailwind

I'm working on getting a new Rails 7 project deployed to production (trying on both Heroku and Render.com) and am getting the following error during build: $ tailwindcss -i ./app/assets/stylesheets/...
Shpigford's user avatar
  • 25.1k
8 votes
2 answers
2k views

Rails 7.0.4 and data confirm for link_to doesn't work

My last chance is some last living developer in RoR Nothing in the darkest corners of the internet works for: <%= link_to 'some-link', '#', data: { confirm:'Are You Sure?') %>; it generate this:...
Wordica's user avatar
  • 2,567
6 votes
1 answer
5k views

Rails: Turbo Stream Broadcast not updating view

I have a Turbo Stream which is not updating the view and I'm not sure why. I have two other broadcasts setup in a similar configuration which are working fine. Everything looks like it should be ...
Phil-6's user avatar
  • 753
3 votes
1 answer
2k views

How to load page specific custom Javascript functions in a Rails 7 app with Turbo, ImportMaps and Stimulus?

I just updated my Rails 6 app to Rails 7 and I am finding it difficult to hook my old "Vanilla Javascript" code into Rails' new setup with Turbo, Stimulus, and ImportMaps. To make things ...
Tintin81's user avatar
  • 10.1k
2 votes
2 answers
863 views

Error encountered when running rails new command

I want to start learning Ruby on Rails. I have installed ruby 2.7.0 via RVM. SQLite3 is also installed by default in ubuntu 20.04.3 LTS. My rails version is 7.0.2.2. When I run the command: rails new ...
Lou KnowsAlready's user avatar
14 votes
3 answers
11k views

Getting a Turbo Frame Error of "Content Missing"

I'm trying to use turbo_frame_tag in my Rails application to manage some tasks. I created a scaffold for my tasks. I wrapped the page I want to use inside of a turbo frame tag as below: <%= ...
folwarczyk's user avatar

15 30 50 per page
1
2 3 4 5 6