ruby-on-rails Questions

2

I'd like to lint the files in my rails project (ideally, in my editor while making edits) via eslint, but I am currently unable to lint files that are pre-processed with ERB. How can I include *.j...
Snowber asked 10/6, 2015 at 5:16

3

Solved

I have the following Time object: [8] pry(#<#<Class:0x007f928f12f560>>)> display_num => 2015-02-19 09:00:00 -0600 [9] pry(#<#<Class:0x007f928f12f560>>)> display_nu...
Antimonyl asked 2/2, 2015 at 22:12

4

Solved

I'm trying to use npm package 'tailwindcss-flip' in my Rails 7 app. The package docs have the following instructions: Install tailwindcss-flip package: Install using NPM npm install tailwindcss-f...
Generalization asked 27/3, 2022 at 21:36

3

Solved

I am getting errors when I try to update ruby to 2.2.4 or 2.2.3. I am on Osx El Capiton Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.11/x86_64/rub...
Opiate asked 5/2, 2016 at 16:4

5

I run a single test with rake test TEST=test/system/my_test.rb and see this: rake test TEST=test/system/my_test.rb Running 1 tests in a single process (parallelization threshold is 50) Run options...
Mctyre asked 6/7, 2022 at 2:8

3

Solved

Full stack trace: /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- ffi (LoadError) from /Users/galharth/...
Brenza asked 14/7, 2016 at 18:36

3

Solved

Does anybody have a nice way of adding * to required form labels, without having to turn to tools like SimpleForm? I did not like the way SimpleForm added all these weird wrappers and classes to m...
Sedative asked 8/3, 2012 at 17:22

6

When I try to start my Rails server, I get the following error: $ bundle exec rails s Your Ruby version is 2.3.7, but your Gemfile specified ~> 2.3.8 I don't understand why that happens thoug...
Uncover asked 30/3, 2019 at 0:28

3

Goal: Upgrade legacy app step by step as recommended by the RailsGuides: Upgrading Ruby on Rails (from ruby 2.3.1 and rails 4.2.2) Expected result: rake assets:precompile completes successfully wit...
Swordbill asked 8/12, 2022 at 3:55

2

Solved

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::Form...
Capable asked 15/11, 2023 at 10:1

5

Solved

I'm working on CRM platform. I would like my users to add, edit and delete custom fields in Client, Contact and Lead objects. Those fields may be plain textfield, list, checkbox, tag etc. Those fi...
Coset asked 10/1, 2017 at 0:36

4

I added the key into heroku config var, but I'm still getting the error. Is this the correct way? I ignored secrets.yml as I read from other sources that its not a good idea to push this to the pu...

4

Solved

I've gone through a good chunk of this tutorial, and have gotten to the part where functionality for deleting articles is added: https://guides.rubyonrails.org/getting_started.html ...but whenever ...
Upset asked 10/2, 2022 at 5:9

6

Solved

After I upgrade to OS10.14, I got this error when I called Httparty response = HTTParty.get('http://api.stackexchange.com/2.2/questions?site=stackoverflow') objc[4182]: +[__NSPlaceholderDictionary...
Pennoncel asked 5/10, 2018 at 19:7

8

Solved

creating a new rails-app (6.0.2) with postgres, on mac, could not get it to run. Getting this error on app start: dyld: Symbol not found: _PQresultMemorySize Referenced from: /Users/dev/.rvm/gem...
Bannerman asked 21/1, 2020 at 17:7

3

Over the course of our project with multiple developers and styles, we have some tests and code that are commented out. Is there an easy way to find all code that is commented out? The tool should...
Spirant asked 14/11, 2012 at 23:39

4

I was following the tutorial here for a Ruby on Rails app to deploy to AWS using Elastic Beanstalk. I am getting the error Unable to assume role "arn:aws:iam::xxxxxxxxxx:role/aws-elasticbeanstalk-...

5

Solved

I'd like to do this test: > This is a long string \n\n\n with new lines But it prints out the "\n" instead of making new lines. I know it's possible to do test: "This is a long string ...
Injector asked 20/7, 2012 at 15:59

2

I have a project on rails that uses Active_Admin and other plug-ins, I get this error in the browser console. How do I fix this? Uncaught TypeError: $(...).aaDropdownMenu is not a function at HT...
Foetid asked 18/9, 2018 at 15:4

5

Solved

Im new to rails and trying to internationalize my app with I18n. In the locales yaml file for the spanish version im trying to set up the translations as follows: es: categories: "Categorias" ho...
Alive asked 24/3, 2014 at 14:58

4

I typed this into terminal $ curl -X POST http://localhost:3000/voice and I got this error curl: (7) Failed to connect to localhost port 3000: Connection refused I've looked everywhere for ...
Matrilineage asked 21/6, 2016 at 19:32

4

Solved

I am having an issue with Active Storage. When I upload to Amazon S3, instead of saving the file inside the bucket with the original name like myfile.zip it is saving it as the key which is associa...

1

I'm trying to import a JS package hosted on a CDN using the new Rails 7 import maps feature. However, whenever my Rails project loads I get a CORS related error in this form: Access to script at 'h...
Storz asked 23/6, 2022 at 7:16

4

Solved

I was trying to follow: Rails: submit (via AJAX) when drop-down option clicked However none of these options appear to work (onsubmit, submit) This is what I currently have that is refreshing the...
Bound asked 18/11, 2011 at 4:55

3

I want to stub sending email and return sample email result for further process. Given I have: message = GenericMailer.send_notification(id).deliver! I want to do something like: allow(Generic...
Guava asked 26/10, 2018 at 5:28

© 2022 - 2024 — McMap. All rights reserved.