ruby-on-rails-5 Questions

4

Solved

I'm trying to install Ruby on Rails v5 on OS X Yosemite 10.10.5, following the instructions on the rails site: http://railsapps.github.io/installrubyonrails-mac.html When I run this: sudo gem in...
Ultramontane asked 11/7, 2016 at 14:14

4

Solved

I'm using Rails5 app and deployed it to EB container successfully. But webpacked assets -- served in public/packs directly, return 404 in production environment. In current situation, I set RAILS...

4

(Rails is version 5.0.0, Ruby 2.3.0p0) I want to create an association between my Users table and Cards table. I've added belongs_to :user to the Cards model, and has_many :cards to the Users mode...
Summertree asked 4/8, 2016 at 17:59

11

Solved

I've got an API mode Rails 5 app that won't let me run rake routes or rails s. The error I get is: $ rake routes rake aborted! LoadError: Could not load the 'listen' gem. Add `gem 'listen'` to the...
Whitacre asked 29/7, 2016 at 16:41

3

Solved

I'm creating a view that features a video stored via ActiveStorage. Currently I'm displaying the video like this: %video{ controls: true, preload:"metadata" } %source{ src: rails_blob_path(@video...

4

Solved

I have this defined Enum for roles: enum role: {ordinary: 0, manager: 1, admin: 2} I would liked to order a collection of objects in the following order: admin (first all admins) ordinary (then...

4

Solved

In my Rails 5 app I am using Liquid to let my users generate content. Based on my users input, I init my template with something like this: string = "Order {{ order.id }} was created {{ order.dat...
Worser asked 23/1, 2018 at 15:24

4

Solved

Starting with ActiveStorage you can know define mirrors for storing your files. local: service: Disk root: <%= Rails.root.join("storage") %> amazon: service: S3 access_key_id: <%= Ra...

1

Solved

Problem Whenever I try to run bundle exec puma -C config/puma.rb --port 5000 I keep getting bundler: failed to load command: puma (/Users/ogirginc/.asdf/installs/ruby/2.7.2/bin/puma) Errno::EADDRI...
Soulier asked 26/10, 2021 at 7:2

3

Solved

I have some problem. In ActiveAdmin I need hide DELETE action by condition. I did it for #index page. But I don't know how do this trick with #show page. Here's code: index do selectable_colum...

2

So I have this use case where I render a message in a controller (with ApplicationController.renderer) that is then broadcasted to a couple of users. The broadcast also is performed in inside the s...
Martinelli asked 12/1, 2017 at 18:35

2

I have a form I want to submit automatically whenever any input field is changed. I am using Turbo Streams, and if I use onchange: "this.form.submit()" it isn't captured by Turbo Streams ...
Sharenshargel asked 2/8, 2021 at 16:0

3

Thank you for checking out my issue. I have an error with the capistorano right now. Have been struggling with this error for few days, so please help me out. I am using the Active storage in the a...

3

Solved

I have PostgreSQL 10.5 database with Rails 5 application. My model: # == Schema Information # # Table name: property_keys # # id :integer not null, primary key # name :string # created_at :dateti...

2

Solved

To run tests in Rails 5+, I'd do two separate commands: $ rails test # Running: ........ $ rails test:system # Running: ........ How can I run both sets of tests from a single command line reques...
Chivy asked 5/11, 2020 at 17:44

0

I need to consume SQS events with my rails application. I've written a Sidekiq job which does a long polling like this: class SqsConsumerWorker include Sidekiq::Worker def perform ... poller ...
Grease asked 16/9, 2021 at 10:58

3

Solved

[Webpacker] Compiling… It takes several seconds (6.2 seconds) to compile any of my changes to javascript files. It's really slowing my JS development down. Is there any way to see what Webpacker...
Behl asked 11/9, 2018 at 18:8

2

Solved

I am using rails_admin for admin panel. Just change association in Image model From this class Image < ApplicationRecord belongs_to :user belongs_to :product end to this class Image &lt...
Intoxicant asked 1/2, 2017 at 12:50

3

Solved

I have a Rails app running in a Docker container. I use Devise for authenticating and Rack::Cors for CORS. On my machine, everything is okay. Once deployed, I can GET the login page correctly, but...
Jacksmelt asked 29/5, 2017 at 14:19

2

I'm trying to test a file upload using RSpec 3.7 in a Rails 5.2 app, and the simplest recommendation I've seen (several places, including this SO post) is to use fixture_file_upload - which looks g...
Stamford asked 31/1, 2019 at 21:22

2

I am trying to send mail in production but it is throwing Activejob deserailization error.sidekiq is running in background. I have added sidekiq gem. I wrote one method in comment_notification.rb f...
Denotative asked 18/11, 2016 at 8:14

5

Solved

In my rails 5.0.0 application I've added the following to my Gemfile: group :development, :test do gem 'byebug', platform: :mri gem 'rspec-rails', '~> 3.5', '>= 3.5.2' end I ran bundle i...
Moreen asked 17/9, 2016 at 1:54

3

I'm trying to build a messaging app with Rails 5 ActionCable, but I'm getting the above error in the JS console. ws://localhost:3002/cable' failed: Error during WebSocket handshake: Unexpected res...

1

Solved

Every file of my rails app i'm editing displays this warning, missing frozen string literal comment, i know this is used to reserve memory and avoid memory re-allocation for all strings literal, bu...
Masqat asked 11/8, 2021 at 17:59

2

Solved

I am new to Rails 5.0.0.1 I followed the guidelines in http://guides.rubyonrails.org/asset_pipeline.html#controller-specific-assets: You can also opt to include controller specific stylesheets and...
Cislunar asked 3/12, 2016 at 10:18

© 2022 - 2024 — McMap. All rights reserved.