ruby-on-rails-5 Questions
5
In my project I have a model categories, which has a detail view(show). The view contains data that should be updated in realtime with actioncable. The content/data of the view is not important to ...
Prescott asked 20/9, 2016 at 15:8
1
Solved
I have a few belongs_to migrations created & migrated but I see now that in Rails 5, the default behavior is required: true which I do not want.
How can I write a simple migration to convert th...
Pratte asked 18/12, 2019 at 16:17
3
I am migrating from using the asset pipeline to webpacker in Rails 5.2. My AJAX responses are all causing Uncaught ReferenceError: $ is not defined in rails-ujs.js errors in the browser console.
I...
Mantra asked 7/5, 2019 at 11:58
1
Solved
Why does my db/structure.sql file contain a CREATE SCHEMA statement after running db:structure:dump?
After migrating my development database, I'm unable to run rails db:test:prepare.
My application uses the db/structure.sql file to update the test database:
# config/application.rb
config.active...
Freeboard asked 7/6, 2019 at 18:45
5
Solved
I'm using Rails 5 + Angular2 to make a web application and I have a model called "Books". My problem, is that I have a file called "books.ts" that has the code:
export class Book {
id: number;
aut...
Heimlich asked 19/4, 2017 at 18:37
2
Solved
I am using rails 5, rails_admin, devise and cancancan.
Everything works correctly, but when there is access denied, it shows a 'You are not authorized to access this page' error screen.
I want to...
Claudiaclaudian asked 2/11, 2016 at 18:52
2
Solved
I've been at this upgrade for multiple hours now and am finally truly stuck.
It all started when I received the typical Bundler::Fetcher::CertificateFailureError. After much tinkering I think I hav...
Hillis asked 23/1, 2017 at 13:37
2
Solved
We just started using the PaperTrail gem and have noticed that 75% of the records in the versions table have nil for the object_changes column. Any idea why this would be happening and how we can s...
Receptionist asked 20/2, 2019 at 14:31
4
Solved
I've been trying to customize the devise register method to register with more parameters and also update more(no luck so far), but I always get Unpermitted parameters: error. I tried using this Ad...
Paling asked 3/3, 2017 at 6:30
0
Converting an app from Rails 4 to Rails 5. Everything is going well, though it seems this line is causing an issue. In Rails 4, it was:
get :show, token: user.token, email: user.email
With Rails...
Sheet asked 21/11, 2019 at 16:41
1
I'm using Aptana Studio 3 on Mac OS X. I'm trying to run my server in debug mode so I can set breakpoints and step through my code. I created the below debug configuration
with the "server" argu...
Dipterocarpaceous asked 13/10, 2019 at 18:49
5
Solved
On Rails 5.
I have an Order model with a description attribute. I only want to validate it's presence if one of two conditions is met: if the current step is equal to the first step OR if require...
Wadewadell asked 27/2, 2017 at 20:27
1
Solved
I use Sidekiq with Rails and the concurrency value returned appears to be wrong. Sidekiq.options[:concurrency] returns 10 instead of 3, which is the value in my config/sidekiq.yml file:
:concurren...
Vogul asked 3/11, 2019 at 20:7
0
I'm using the paper_trail-association_tracking gem to save PaperTrail versions for AR associations. I have a model, let's call it User, that has many Groups and has many Skills. Both of these assoc...
Nucleon asked 22/10, 2019 at 18:49
3
Solved
I try to test if two arrays of arrays contain same elements, without testing order of elements.
(Rails 5.2 / Rspec-rails 3.8.2)
exemple :
[['a1', 'a2'], ['b1', 'b2']]
[['b2', 'b1'], ['a2', 'a1']]...
Reglet asked 21/10, 2019 at 8:12
1
I'm using Aptana Studio 3 on Mac High Sierra. I have imported my Rails 5 project and would like to debug some rspec tests in the IDE. On the command line, I normally run
bundle exec rspec /spec/pa...
Th asked 12/10, 2019 at 17:41
1
I am getting ActiveRecord::ConnectionTimeoutError once or twice in a day. could someone help me in calculating how many connections my application is making to my DB? and suggestion to optimise my ...
Comeaux asked 17/10, 2019 at 6:50
3
Solved
I have rvm installed on my PC with the default ruby gemset being 2.4.1
rvm list
ruby-2.4.0 [ x86_64 ]
=* ruby-2.4.1 [ x86_64 ]
ruby-2.6.3 [ x86_64 ]
# => - current
# =* - current && ...
Radical asked 9/10, 2019 at 10:51
1
Solved
I have a Rails 5 app and I wanted to destroy and rebuild my live database (site not launched yet).
So I followed the steps that should've worked (they used to work in the past):
heroku pg:reset H...
Ambala asked 25/9, 2019 at 20:24
5
Solved
Previously I had my middleware under lib/middleware/my_middle_ware.rb
However when doing this,
config.middleware.use MyMiddleWare
I receive a
NameError: uninitialized constant
Where is rail...
Sanctity asked 21/6, 2017 at 23:56
2
Solved
I am trying to deploy an updated version of a rails app to a droplet on DigitalOcean using mina
When I run mina deploy I get the error Missing encryption key to decrypt file with. Ask your team fo...
Chiasmus asked 10/10, 2018 at 21:28
7
Solved
After upgrading a Rails app to Rails 5, running RSpec tests gives me the following error:
rails aborted!
ActiveRecord::NoEnvironmentInSchemaError:
Environment data not found in the schema. To re...
Krp asked 5/7, 2016 at 17:22
5
Solved
It's a constant headache when dealing with websockets, and it kills my performance in addition to adding bugs. Since ActionCable is the whole reason I upgraded I'd very much like to get rid of it c...
Thereinto asked 29/7, 2016 at 2:18
0
I am running tests on Codebuild using Docker. I am using MySQL 5.7 community server using mysql docker image. In my dockerfile, I am using following apt-get update command to get default-mysql-clie...
Caldron asked 5/9, 2019 at 16:24
0
I'm using Rails 5 and Ruby 2.4. I want to start my server in debug mode so that I can debug in my IDE (Aptana Studio). I tried the below but get the error ...
localhost:ruby-angular-app davea$ rai...
Backbencher asked 4/9, 2019 at 21:19
© 2022 - 2024 — McMap. All rights reserved.