Pat James

Joined

160 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in How to use ESBuild in Rails with JSBundling Discussion

I keep running into this issue when I run ./bin/dev
everything else seems to run

Error: Can't find stylesheet to import.
16:49:51 css.1 | ╷
16:49:51 css.1 | 1 │ @import 'bootstrap/scss/bootstrap';
16:49:51 css.1 | │
16:49:51 css.1 | ╵
16:49:51 css.1 | app/assets/stylesheets/application.bootstrap.scss 1:9 root stylesheet

Rails 7.0.4
Ruby ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin20]
yarn 3.2.3
npm -v 8.19.1 not sure if this is even needed

application.css
/* Error: Can't find stylesheet to import.

  • ,
  • 1 | @import 'bootstrap/scss/bootstrap';
  • |
  • '
  • app/assets/stylesheets/application.bootstrap.scss 1:9 root stylesheet */

body::before {
font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",
"Droid Sans Mono", monospace, monospace;
white-space: pre;
display: block;
padding: 1em;
margin-bottom: 1em;
border-bottom: 2px solid black;
content: "Error: Can't find stylesheet to import.\a \2577 \a 1 \2502 @import 'bootstrap/scss/bootstrap';\a \2502 \2575 \a app/assets/stylesheets/application.bootstrap.scss 1:9 root stylesheet";
}

any ideas

Oh and thanks for responding

Hey Austin,
I use digital ocean to host the production server,
but I have not been able to find the console,
Do you spin up a separate server for development, what text editor do you use?

I have been using cloud 9 and an IDE but was wondering if anyone is running an IDE on Digital Ocean

Posted in Deploy Ubuntu 20.04 Focal Fossa Discussion

Getting the error no running passenger app at /home/deploy/project-portalMK5/
the problem was in the
Change myapp to the name of your app. We'll use this same folder later on when we define our Capistrano deploy_to folder.

server {
listen 80;
listen [::]:80;

server_name _;
root /home/deploy/myapp/current/public; #bug was here should have been deploy not root

passenger_enabled on;
passenger_app_env production;

Posted in Deploy Ubuntu 20.04 Focal Fossa Discussion

I am unable to run the app in production
Your Ruby version is 2.7.0, but your Gemfile specified 3.1.2
however ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
also deploy@agility:~/project-portalMK5/current$ rbenv versions
system

  • 3.1.2 (set by /home/deploy/project-portalMK5/current/.ruby-version) also Gemfile source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "3.1.2" also also .ruby-version 3.1.2 I have spent hours getting nowhere, appreciate any help.

Posted in Deploy Ubuntu 22.04 Jammy Jellyfish Discussion

deploy failed with yarn install, however this stack-overflow solved my problem
https://stackoverflow.com/questions/46013544/yarn-install-command-error-no-such-file-or-directory-install/47680012#47680012

ssh into the production server and ran
sudo apt remove cmdtest
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn -y
then
yarn install

then proceeded with cap production deploy , now have production up and running

Hi Everyone,
Going through the process of setting up a new rails project
If I use rails new Rails generates a file importmap.rb in the config folder
If I use rails new -j esbuild —css bootstrap the install does not create the importmap.rb
Is there a work around for this.
Pat SY StellaAustralis

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.