ruby-on-rails-5 Questions
0
I have a Rails 5 app in which I use Globalize for localization. I'm currently having an issue where I can't save new objects if they don't have any translations.
My model looks like this:
# Produ...
Hulk asked 8/8, 2018 at 20:50
1
Solved
I am a newbie to Ruby and Rails. I am building a web application using Ruby on Rails 5.2. I have configured it to use the redis-cache-store to manage the view caching:
config.cache_store = :redis_...
Dignify asked 7/8, 2018 at 2:12
1
I have a rails hotel application which has rooms inside it. Rooms can have n number of tickets associated to them. I have create a counter cache with counter culture gem which updates the room tabl...
Lemos asked 1/8, 2018 at 21:39
3
Solved
I am getting error:
write': "\xCF" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
from line:
open(uri) {|url_file| tempfile.write(url_file.read)}
relevant code is:
require 'te...
Drumfire asked 14/7, 2017 at 17:53
3
Solved
I've multiple issues to load / require classes under my app/services folder in a Rails 5 project and I'm starting to give up on this issue.
First of all and to be clear, services/ are simple PORO ...
Predictory asked 28/7, 2018 at 0:10
4
Solved
I upgraded the project to Rails 5. When I run rspec I get a warning
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead.
From module, you can access the orig...
Lockwood asked 21/10, 2016 at 9:58
4
Solved
ruby version - 2.4.2
rails - 5.1
rails new my_app --webpack=react
when I try to start server with foreman start -f Procfile.dev or just ./bin/webpack-dev-server
I get following error and coul...
Murtagh asked 1/3, 2018 at 10:48
1
Trying to figure out why I can’t get source maps working in Rails 5. Rails 5 uses Sass 3.4.2x, so it seems like it shouldn’t have the problem previous versions of Rails had.
I’ve added the followi...
Handcrafted asked 12/2, 2016 at 19:16
2
Solved
I am upgrading a Rails app from 4.2.x to 5.0.x. After I updated all my Rails-related gems in Gemfile, I ran the rails task for updating all my files to conform to the newest version, as per the upg...
Lorislorita asked 20/7, 2017 at 14:10
2
Solved
Everyone :).
I know people have already faced alot of problems related to mine. I have tried all but my issue has not been resolved. I have been working from past 3 days to fix this but I am unable...
Behah asked 4/5, 2017 at 2:4
2
I have searched the web far and wide (including reading many code examples for ActionCable) for what seems to be an answer to a very basic question. Alas, I have not solved my problem.
Suppose, I ...
Abebi asked 26/8, 2016 at 18:6
1
Solved
I have a project where I have nested objects. I have tried to figure out the correct syntax for nested array. This is something that I have tired (among of the many other things):
parameter name: ...
Daumier asked 15/6, 2018 at 7:12
1
Solved
I have a model Post with
has_one_attached :cover
Having an attachment is not necessary.
So, is there any way that I can add a default attachment even if the user doesn't provide one.
So, when t...
Iva asked 12/6, 2018 at 7:40
7
Solved
Everything was working fine and Omniauth has stopped working suddenly. I didn't make any code changes.
I checked Twitter Apps Settings:
I have callback url to my main production url, and Callback...
Franchot asked 12/6, 2018 at 22:33
2
Solved
I have an array column in postgres and I want to find all the records where this column is either nil or []. I can search one or the other fine but trying both fails.
This is what I attempted
Mod...
Burseraceous asked 8/6, 2018 at 4:16
0
I have added few javascript and css libraries to the vendor/stylesheets and vendor/javascript directories. I am not able to import those in my app/javascript/packs/application.js. I am using webpac...
Frawley asked 7/6, 2018 at 0:49
3
Solved
If you had this in Rails 4:
t.references :event, index: true
Now you could use foreign_key instead of index in Rails 5. I don't quite understand WHY they decided to do this, since the functional...
Radioactivity asked 29/9, 2016 at 12:11
4
Solved
I have just upgraded to Rails 5 and I have a weird issue while trying to show an image.
I have the exact code I had for Rails 4:
<%= image_tag article.image_url(:thumb) %>
But after upgra...
Fundy asked 30/5, 2016 at 16:18
2
Solved
Does the :async queue adapter actually do anything?
:inline, which is what is default in Rails 4, processes jobs built with ActiveJob, uh... inline, in the current execution thread. Async, shouldn...
Ptosis asked 11/7, 2016 at 20:20
1
First of all I don't know if this is a bug or not. Until now I've been using this command in rails development.rb environment config so the box detects changes on my files:
config.reload_classes_on...
Repeated asked 30/5, 2018 at 16:5
3
Solved
I have the following models and relationships:
A User has many Offers (where he/she is the seller), an Offer has many Purchases, a Purchase has many Accbooks
Models and associations:
class Use...
Fineman asked 17/5, 2018 at 23:13
1
Solved
I just migrated my create_supplier migration, then I realized that one of my data type was wrong, so I added another migration which looks like this:-
class ChangePhoneToStringInSuppliers < Act...
Emmanuelemmeline asked 22/5, 2018 at 4:16
1
Solved
I am adding JWT Auth for a completely new frontend to a legacy Rails backend.
Upon HTTP request, it seems most sources suggest I send the token back to the server via Bearer Header.
Why? What is ...
Arni asked 13/5, 2018 at 8:55
4
Solved
I'm following a simple tutorial and my for some reason, 2 of my view mutations (addCard, and addList) are working correctly...however, my 3rd mutation (editCard) does not seem to work in Vue. When ...
Rexferd asked 20/4, 2018 at 3:28
1
Solved
We're running a Rails 5.1 app on ECS using a docker image based on the official ruby:2.4.2 image.
On many deploys we receive this exception, from what I understand from the old process:
SignalExc...
Profitsharing asked 22/2, 2018 at 8:40
© 2022 - 2024 — McMap. All rights reserved.