Category "ruby-on-rails"

C:/Ruby30-x64/bin/ruby.exe: bad interpreter: No such file or directory

I'm new to rails. Error -bash: /mnt/c/Ruby30-x64/bin/rails: C:/Ruby30-x64/bin/ruby.exe: bad interpreter: No such file or directory I'm trying to run server on m

How to install jQuery and bootstrap in rails 7 app using esbuild (without webpacker)

I'm trying to create a rails app by installing bootstrap and jQuery. First I tried to create using rails new name--css bootstrap But its not working. So I did

Find version where specific attribute has changed in papertrail

I'm using the Papertrail gem in my project and have searched extensively to try and find how to do the following. What I'd like to do is find the version of my

Need a less repetitve way to start Rails on Mac

I've been on a Mac just over a month and before that I've been using Windows and wrote a .bat file to run a few other little .bat files to fire up MongoDB, guar

sass-watch: command not found whenever I run sass-watch

I have Ruby and sass installed already, but I'm getting a sass-watch: command not found Whenever I run sass-watch . Any ideas?

Could not open library 'vips.42'; Could not open library 'libvips.42.dylib'

When upgrading from rails 6 to rails 7, and running some ActiveStorage methods locally, I see: Could not open library 'vips.42': dlopen(vips.42, 0x0005): tried:

Simple - using String#scan to extract an email address

I've got a string that contains: @from = "John Doe <[email protected]>" When I do: @from.scan('/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i') I

Have to_json return a mongoid as a string

In my Rails API, I'd like a Mongo object to return as a JSON string with the Mongo UID as an "id" property rather than as an "_id" object. I want my API to ret

What is the send() method used for?

Could someone please help me to understand what the 'send()' method listed below is used for? The code below, when I am reading it, makes no sense what purpose

An error occurred while installing unf_ext (0.0.7.2), and Bundler cannot continue

I was trying to install diaspora into localhost. I removed the Gemfile.lock file and tried bundle install and am seeing this. These are the things I already tr

rspec testing carrierwave

I'm making a rails 3.1 app using carrierwave to upload files to aws s3. I've followed the instructions on the carrierwave github repository and am now able to

ROR + Unable to install tiny_tds

Here I am trying to fetch data from MS-SQL Server 2008 to my Rails application on Ubuntu 10. But I am unable to install tiny_tds. I follow the step given at git

ActiveAdmin still does subquery_for_count even when pagination_total: false

I have a redshift table in the billions of records, lets call it SomeModel. ActiveAdmin.register Redshift::SomeModel do menu parent: 'Redshift' config.filt

uninitialized constant Formtastic::I18n::SCOPES

Rails 6.0.1, Puma 4.3.0, Devise 4.7.1, ActiveAdmin 2.4.0, Formtastic 3.1.5. Once again I am creating a Rails application. Created the foundation. A couple of m

How to set env variables using ASDF in a Rails project

Rbenv uses rbenv-vars to specify per-application environment variables in Rails. Most version managers read the .env file in every project for the environment

How to handle too much logic in the controller vs the models calling each other

I encountered a code design problem while working on a small application. In terms of features, there are a list of tables, each having 2 seats. If two players

How to tell if homebrew is installed on Mac OS X

I am doing some Rails programming and I consistently see Homebrew referenced in solutions around the web but have never used it. I also notice Homebrew in the

How to add roles to rails app from console? Cancan, Devise

I can create user already, but how add roles dynamically? from console or with admin rules? Devise, CanCan. I am new at Rails, but if you will propose me some i

Rails: Turbolinks back to top of page

I am using turbolinks for rails; whenever I click on a link the page scrolls down to the previous page's scroll position. I want all my pages to load such that

Rails 5 belongs_to_required_by_default doesn't work

I use Rails 5.0.0, but for some reason belongs_to_required_by_default doesn't work! Application was created as new rails 5 app class Visit < ApplicationRec