Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
2k views

I am trying to convert my rails 7 application using sprockets to use import maps because I was having issues using turbo and hotwire. I am not using bootstrap or tailwind. We are using materialize. ...
Jeff S's user avatar
  • 21
1 vote
0 answers
39 views

I am using backbone js as frontend in rails 7 application. In index.html file I have called backbone main file. code is coming in this file. But here I have initialise router file. In which getting ...
Divya Keswani's user avatar
1 vote
0 answers
365 views

Can anyone tell me why the following is not working in Rails 7? <%= link_to "delete", user, data: { turbo_method: :delete } %> The expected action was a DELETE request routed to the ...
Matthias's user avatar
  • 1,963
3 votes
1 answer
2k views

I am following this tutorial: https://www.hotrails.dev/articles/rails-modals-with-hotwireEverything goes well until I create this stimulus controller file: import { Controller } from "@hotwired/...
Volkan's user avatar
  • 556
2 votes
1 answer
341 views

I am trying to add Markdown support in Rails 7.1.1 app. Redcarpet gem version is 3.6.0. I follow advice from this question: Using ERB in Markdown with Redcarpet My current code (in /config/...
Max Berdnikau's user avatar
1 vote
1 answer
188 views

I'm trying to make a delete helper for a comment, this is the html code : <% if store_comment.user_id == current_user.id %> <%= link_to 'edit', edit_store_post_store_comment_path(params[:...
John Sall's user avatar
  • 1,173
0 votes
0 answers
62 views

I have a simple email signup form that for now only accepts your email. However, if I try to post, I get the following error message Started POST "/landing" for 127.0.0.1 Processing by ...
dare0021's user avatar
  • 637
1 vote
0 answers
425 views

In the latest Rails 7.1.2 my engines have stopped working with the following error Zeitwerk::NameError: expected file /home/jamie/Development/rails/comtech/r7/ccs_cms/engines/admin_dashboard/app/...
jamesc's user avatar
  • 12.9k
0 votes
2 answers
3k views

Im using windows. I wanted to include font awesome icons to my project and so I added gem 'font-awesome-sass', '~> 4.6', '>= 4.6.2' to my gem file did a bundle install and got this: Fetching ...
Wellington Mitole's user avatar
1 vote
1 answer
271 views

I'm a beginner working on a Ruby on Rails application where I want to ensure that deleting a user also deletes their associated messages, participants, and rooms. I have set up associations, but I am ...
Wellington Mitole's user avatar
1 vote
2 answers
81 views

I have a setup where I route all requests for /upload/* to Rails. Using the blog example, I want somedomain.com/upload/article/new to be treated as somedomain.com/article/new by Rails. I ended up with ...
dare0021's user avatar
  • 637
1 vote
1 answer
342 views

I would like to load the images that users submit into the Stimulus controller so that I can use it within my Three JS (3D JavaScript Library) code. How can I achieve this? I’ve already tried so many ...
Inês Lucas's user avatar
0 votes
1 answer
154 views

I have only added the JQuery using CDN, I placed the code in the head, in _head.html.erb which is this one : <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="...
John Sall's user avatar
  • 1,173
1 vote
1 answer
837 views

I'm using the Bootstrap gem in Rails 7. I'm just trying to get a simple Bootstrap modal working. The dropdowns in the app work fine, so I assume JS is setup correctly, but just in case: importmap.rb: ...
nope2023's user avatar
  • 1,788
13 votes
2 answers
6k views

In a new Rails 7.1.2 app, the following lines can be found in config/environments/production.rb: config.logger = ActiveSupport::Logger.new(STDOUT) .tap { |logger| logger.formatter = ::Logger::...
Manuel Meurer's user avatar
1 vote
2 answers
1k views

Hello, I'm relatively new to Turbo Streams and Frames, and I'm currently facing an issue with rendering replies to comments using Turbo Frames and Streams. Let me explain my setup. I have a Comment ...
mutebi godfrey's user avatar
0 votes
1 answer
204 views

When I am changing the page using pagination button or using the scrobble bar in the kanban board card getting DoubleRenderError in Ruby on Rails occurs when I attempt to both render and redirect in ...
Rahul kumar's user avatar
1 vote
1 answer
349 views

I have been following this tutorial https://www.youtube.com/watch?v=TKIbtbYyRdE&list=PL6SEI86zExmvb4qjVHJWrKRQrKjWksQ81&index=34 followed by its 2nd part https://www.youtube.com/watch?v=...
uma's user avatar
  • 63
0 votes
0 answers
99 views

I have a rails project which on rails s loads and runs fine. but when I containerize the application, required modules in lib folder are not loaded and could be not found in the docker file structure. ...
user_pruser's user avatar
0 votes
1 answer
36 views

This is my form : <form action= "<%= store_post_store_comments_path(params[:id]) %>" method="post"> <div class='field'> <textarea name="...
John Sall's user avatar
  • 1,173
0 votes
1 answer
343 views

I have generated the migration file and added t.string :address. before ''' rails db:migrate''' I added the line- add_column :users, :address, :string, limit: 10, after: :email but it was added last ...
Abhishek Tanwar's user avatar
0 votes
1 answer
193 views

When testing a rails 7 controller everything works splendidly until I get a redirect and then execute a follow_redirect!. At this point the session mysteriously disappears and my tests can no longer ...
David Wolff's user avatar
0 votes
1 answer
147 views

I am trying to build a very simple menu with submenus using Rails 7, Bootstrap 5 and Jquery. HTML: <div> <button class="toggle-submenu">Sales</button> <div ...
almo's user avatar
  • 6,437
0 votes
1 answer
116 views

Based on image above, I do a simple example. Model: Person class Person < ApplicationRecord belongs_to :personable, polymorphic: true end Model: Customer class Customer < ApplicationRecord ...
Saulinho's user avatar
0 votes
1 answer
118 views

I have subfolders inside the models folder: app/models/foos/bar.rb Autoload paths is configured in application.rb: module AppName class Application < Rails::Application config.load_defaults 7....
B Seven's user avatar
  • 46.3k
1 vote
1 answer
95 views

I need to preserve the structure in a data-tinymce html tag to pass to a javascript function but the structure is somehow not being preserved and this is causing the method in the javascript function ...
jamesc's user avatar
  • 12.9k
4 votes
2 answers
953 views

Just install active_admin in rails 7 and ruby 3.1.0 gem 'activeadmin', github: 'activeadmin/activeadmin', branch: 'master' It add two style files. One is active_admin_old.scss and other is ...
Haseeb Ahmad's user avatar
  • 8,830
1 vote
0 answers
452 views

I use Rails 7 and turbo. I want to use a Bootstrap 5 admin theme but having the following issue: To bind the click event to the menu toggle button, there is some code like this: let menuToggler = ...
almo's user avatar
  • 6,437
3 votes
1 answer
208 views

Using the tinymce-rails gem in a Rails 7.1 engine, I have a form partial and a dynamically added nested fields form _page_section_fields partial, the nested fields form has a text area that makes use ...
jamesc's user avatar
  • 12.9k
9 votes
3 answers
3k views

When upgrading to the latest version of rails, I'm experiencing the following error with passenger refusing to start. The application encountered the following error: You have already activated ...
David Kane's user avatar
1 vote
1 answer
1k views

I have a SectionComponent Class as follow : class SectionComponent < ViewComponent::Base def initialize(..) ... end end And a matching section_component.html.erb file. It works perfectly ...
Maxence's user avatar
  • 2,379
3 votes
1 answer
532 views

So, i recently created a rails 7.1 application and came about this weird thing: the headers are not properly set. It looks like the Set-Cookie header instead of getting repeated for every element of ...
Anonymus's user avatar
  • 353
2 votes
0 answers
1k views

This seems to be touched on in this question Next.js 13 Cookie value not retrieved from Route Handler, but the answer there isn't working for me. I have a Nextjs 13.4 frontend and a Rails 7 API-only ...
baconsocrispy's user avatar
4 votes
2 answers
2k views

I bumped my application to Rails 7.1, and on my development server, signing in using my Devise setup works fine. However, on my staging server (RHEL7 using nginx), authentication no longer works. At ...
aseroff's user avatar
  • 129
0 votes
1 answer
536 views

I want to have a JavaScript file available for a view in my Rails app. // app/javascript/custom/manage.js document.body.style.backgroundColor = 'lightblue' const test = document.getElementById('test')...
Alabhya's user avatar
1 vote
2 answers
777 views

I want to prepend a string to the uuid generated by PostgreSQL's gen_random_uuid() to use as the uuid for one of my models (it won't be the primary key). Think like Stripe's price and customer ids - &...
supersaidso's user avatar
1 vote
1 answer
422 views

I am using importmap with a downloaded version of tinymce in a rails 7.1 engine. I am failing to get the editor to display and the browser console shows the following error Uncaught ReferenceError:...
jamesc's user avatar
  • 12.9k
0 votes
0 answers
830 views

I have a Rails 7 SaaS app using Devise for authentication, that signs up a new user on the www.my-site.com subdomain and redirects them to the actual app after signup at dashboard.my-site.com. Also, ...
D-Nice's user avatar
  • 4,870
1 vote
1 answer
465 views

I setup a DigitalOcean Ubuntu 22 droplet to host a docker swarm with containers for a rails app, postgress, and redis. I’m not able to get action cable to work with puma and nginx. I see errors in the ...
user3612719's user avatar
12 votes
4 answers
4k views

Hi I have this Company model with the following enum that works fine for rails < 7.1 class Company < ApplicationRecord enum auth_type: { password: 'password', magic_link: 'magic_link',...
Ramon Marques's user avatar
0 votes
3 answers
1k views

I have created a migration in which i mistakenly duplicate the columns of "created_at" , now my screen is displaying this error, after when i remove the duplication, the errror was also same ...
Afaq Shahid Khan's user avatar
1 vote
1 answer
265 views

in config/importmap.rb: pin "maplibre-gl", to: "https://ga.jspm.io/npm:[email protected]/dist/maplibre-gl.js" However, trying to use this library: import * as maplibregl from &...
renen's user avatar
  • 451
0 votes
1 answer
127 views

I have a rails app in production and i am having cookie problem. i have, www.domain.com domain.com so my payment processor is logging the user out after a payment transaction if i use domain.com So ...
uma's user avatar
  • 63
0 votes
0 answers
36 views

I have a Modal that has a devise form for authentication. If I click keep the fields clear and click on 'Sign Up', the errors do appear on the modal but the modal closes. How do I keep the modal open ...
Benjamin Sunderland's user avatar
0 votes
2 answers
209 views

I have a rails 7 app where when the user clicks the button, it redirects to a payment gateway for doing payments online via GET Request, in my development mode, in local machine (on localhost:3000), ...
uma's user avatar
  • 63
5 votes
0 answers
2k views

When upgrading to Rails 7.1 we are getting an error when trying to use url_for in the response when creating a new record. After creating a chat object with one attached picture, the response includes ...
Phil-6's user avatar
  • 853
1 vote
1 answer
165 views

Trying to build this with Active admin 3.0. This seems so basic to me that I feel I must be missing something. Let's assume I have a Store model and an Employee model and a store has many employees ...
Andrew's user avatar
  • 1,013
0 votes
1 answer
147 views

I'm getting a deprecation warning when upgrading to Rails 7.1 and Google has no search results! The warning is DEPRECATION WARNING: Assigning a numeric/epoch value to scheduled_at is deprecated. Use a ...
Phil-6's user avatar
  • 853
1 vote
0 answers
46 views

I have a controller and inside the controller def publish post = Post.find(params[:post_id]) post.update(published: true, published_at: Time.now) redirect_to edit_post_path(post) end def ...
rubyongainz's user avatar
0 votes
1 answer
313 views

Hi i am having a application built in rails 6 and i am trying to update it to rails 7 but there's some problem i am facing with zeitwerk. in the rails admin initilizer # initilizer/rails_admin.rb ...
Prateek Vyas's user avatar

1
3 4
5
6 7
21