Save 36% for Black Friday! Learn more

Rails Ruby on Rails Forum

uninitialized constant User::shift

3
Rails
I got this error: uninitialized constant User::shift here's the stack trace def redirect_based_on_shift_state if current_user created_shifts = current_user.shifts.in_state(:created...
Jacob Montgomery replied

ActionCable Production Error - Websocket Handshake 404

0
Rails
Hello all, I've been trying to figure out this actioncable Websocket error I'm getting on production in an AWS EB environment on an Application Load Balancer. It's a 404 error and als...
Benjamin Broestl posted

Got error File to import not found or unreadable: foundation/functions.

1
Rails
I upgraded my rails app ruby version from 2.2.1 to 2.5.1 and some its gems. When I load my rails app I got this error. Below are my gems: gem 'mysql2', '< 0.5.0' gem 'rails&...
Chris Oliver replied

How to prevent access to a group if user isn't a member?

4
Rails
Hi all, I have user groups setup on my app using the code below... ``` class User < ActiveRecord::Base has_many :user_groups has_many :groups, through: :user_groups end class Group < A...
Alan Reid replied
Solved

RuntimeError (can't modify frozen String)

5
Rails
got this runtime error on heroku, it had been working fine... I traced it down to this ``` add_breadcrumb 'category / ' << @title, categories_path ``` in my category controller ...
Alan Reid replied

Unable to run old ruby n rails project

0
Rails
Hi I am new to ruby n rails. I was working on this old website. This website is hosted on the heroku server. I fixed the code which was required and it didn't install this website on my system ...
Hemant posted

I was wondering if you ever considered doing a series on salesforce

2
Rails
I see a lot of ROR coders in forums looking for information on how to implement some Ruby or ROR with their salesforce implementations. I was wondering if you ever considered doing a series on t...
Brandon Buteaux replied

How to insert comma separated values in database from rails active admin form?

0
Rails
The details are here https://stackoverflow.com/questions/53350010/how-to-insert-comma-separated-values-in-rails-active-admin-form
rachit474 posted

How do I upload files with ActiveStorage and Vue.js?

3
Rails
Hey GoRailers, Stemming from the Rails & Vue.js Trello Clone, I'm looking to add file uploads to a Card model using the new Rails 5.2 ActiveStorage feature. I'm stronger in Rails - pre...
Abhinav Mathur replied

ActiveStorage trix image before record exist.

3
Rails
Hi, I have a Concept model with description string field. Concept `has_many_attached :images`, I use them to store images that I dragged into trix wysiwyg. Everything works great if Concept alrea...
Chris Oliver replied
Solved

eval issue in Rails view

1
Rails
Any idea why the following code : <% model_set = instance_variable_set("@#{table_name}", eval("#{model_name}.all")) %> produces this runtime error: (eval):1: syntax er...
Mark Nelson replied

"Controller action should call one model method..." (?)

1
Rails
***Controller action should call one model method other than an initial find or new*** *This inspection warns if a controller action contains more than one model method call, after the initial .fin...
Nelson replied
Solved

active record with oracle_enhanced adapter

0
Rails
Hi, i hope that someone can help me....There is a way to set ClientInfo Property that use my active record connection with oracle_enhanced adapter? Maybe in initializers\oracle.rb ?
DamianoRoRDev posted

What is wrong in my script?

1
Rails
Hi dear community, I created a survey app which has questions and answers as radio buttons. So firstly i asked on [stackoverflow](https://stackoverflow.com/questions/53241227/rails-survey-response-...
Chris Oliver replied

I got an error

1
Rails
Showing /home/ubuntu/workspace/bantayanBlog/app/views/layouts/application.html.erb where line #5 raised: File to import not found or unreadable: bootstrap-sprockets. Load paths: /home/ubuntu/wor...
Joe Guerra replied

Page acts like it is taking a long time to load but doesn't load.

0
Rails
From the root page of my project, (new.html.erb) if you click 'done' to navigate to the results page it will not load. It will act like the page is loading but ultimately won't. My goal...
alexanderross936 posted

How to calculate MRR in Stripe?

0
Rails
I need total sum of MRR amount in single digit. Anyone knows how this is possible in Stripe?
Anthony Lee posted

Creating reports in Rails

2
Rails
Hi, I used to develop software using the Microsoft stack for both desktop and web, now I'm trying Rails for web and I was just wondering how can I produce reports for the users to save/print. S...
Nelson replied

User-customizable roles? (best practices, ideas, examples)

1
Rails
I'm looking to implement a user-customizable roles feature in an application and I was wondering if anyone had any ideas, experiences, or good examples from other apps. I'm looking for idea...
Sean M replied

How to force a has_many association using a different column as foreign key

1
Rails
Stuck in a - at first sight - simple problem in RoR. I have two ActiveRecord models: Foo has many Bars.. But I want to bind them by "custom_id" (not the default id): ``` class Foo < A...
Sean M replied

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.