Foreman: Command "start" is not defined - ruby-on-rails

I'm getting the above error when trying to run foreman start from command line.
I installed the gem:
gem install foreman
Then defined a procfile. Why am I getting this error? When I run foreman list, I get:
Available commands:
build Commission Forman to build a new Laravel app for you
help Displays help for a command
list Lists commands
scaffold Generate a scaffolded Foreman template file
self-update Updates the application.

https://github.com/Indatus/foreman you use different foreman :)
https://github.com/ddollar/foreman it's what you need

Related

bin/dev: 8: exec: foreman: not found

Hello I am currently following a tutorial in order to connect react to my rails app that uses https://github.com/rails/jsbundling-rails and went with esbuild, however when I run bin/dev in my terminal I get the above error any help is appreciated as this is my first time trying to use react along with a rails app
You need to install foreman gem. You can install it in the terminal with this command:
gem install foreman

Not able install & setup tailwindcss-rails in ruby on rails app

I'm trying to use tailwind in my rails project, but I'm not able to install & run it on my system. It seems like there is some issue with the x86_64-linux platform as I'm using WSL to build my ruby on rails apps.
In my previous projects, I've also tried installing tailwindcss-rails separately following the official guide: https://tailwindcss.com/docs/guides/ruby-on-rails, it didn't work and was throwing the same error.
Can anyone of you please provide a workaround or any other possible fix?
Here's the command which was used for installation:
rails new task-management-app --database=postgresql --css=tailwind
Here's the log & error which was generated:
Add default config/tailwindcss.config.js
create config/tailwind.config.js
Add default app/assets/stylesheets/application.tailwind.css
create app/assets/stylesheets/application.tailwind.css
Add default Procfile.dev
create Procfile.dev
Ensure foreman is installed
run gem install foreman from "."
Successfully installed foreman-0.87.2
Parsing documentation for foreman-0.87.2
Done installing documentation for foreman after 1 seconds
1 gem installed
Add bin/dev to start foreman
create bin/dev
Compile initial Tailwind build
run rails tailwindcss:build from "."
["/home/rishabh/.rvm/gems/ruby-3.0.1/gems/tailwindcss-rails-2.0.21-x86_64-linux/exe/x86_64-linux/tailwindcss", "-i", "/mnt/d/Programming/Web/Rails/practice/practice/task-management-app/app/assets/stylesheets/application.tailwind.css", "-o", "/mnt/d/Programming/Web/Rails/practice/practice/task-management-app/app/assets/builds/tailwind.css", "-c", "/mnt/d/Programming/Web/Rails/practice/practice/task-management-app/config/tailwind.config.js", "--minify"]
/home/rishabh/.rvm/gems/ruby-3.0.1/gems/tailwindcss-rails-2.0.21-x86_64-linux/exe/x86_64-linux/tailwindcss: 1: ELF: not found
/home/rishabh/.rvm/gems/ruby-3.0.1/gems/tailwindcss-rails-2.0.21-x86_64-linux/exe/x86_64-linux/tailwindcss: 4: Syntax error: word unexpected (expecting ")")
rails aborted!
Command failed with exit 2: /home/rishabh/.rvm/gems/ruby-3.0.1/gems/tailwindcss-rails-2.0.21-x86_64-linux/exe/x86_64-linux/tailwindcss
Tasks: TOP => tailwindcss:build
(See full trace by running task with --trace)
The quickest way to start using Tailwind CSS in your Rails project is to use Tailwind CSS for Rails by running rails new my-app --css tailwind. This will automatically configure your Tailwind setup based on the official Rails example. If you'd like to configure Tailwind manually, continue with the rest of this guide.follow the steps properly.

Ruby on Rails ufinished

enter image description here
I have been trying execute the command --> rails new weblog in Terminal from Linux Mint after install Ruby however the application cannot be complete with the same error message, below:
Either bundle install or rake exec bundle install
What I can understand from the logs referenced in the question is that you are not executing bundle install command inside the project directory i.e. weblog. So first cd to weblog.
cd weblog
bundle install
I hope this helps!.

How do I get Bundler gem to work without doing /bin/bash --login

I've been following a lot of instructions on how to fix my Rails installation without really understanding everything. I can create a new Rails app now, but only if I type
/bin/bash --login
in the terminal first. If I don't do that first, the
rails new
command fails when it gets to the part with
bundle install
This is the first line of my error message I get when it fails:
/usr/lib/ruby/2.2.0/rubygems.rb:243:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
Is there a path setting or something I can fix so I can make a new rails app in a virgin terminal window? Also, what does bin/bash --login do? It doesn't change the command prompt, and I thought I already logged in when I entered my password to start Linux.
I would recommend you use:
rails <version> new <appname>
... where <version> is the Rails version you wish to use (e.g. _4.2.0_) and <appname> is the name of the app you wish to create. Make sure you are at the root of your workspace when you run this command.
/bin/bash --login will invoke Bash as a non-interactive shell and execute commands from /etc/profile. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. See detailed documentation here. So, when you run this, it is possible that you are setting some environment variables when you do this which allow your Rails app to be created.

Can't run command rails console on EC2 after deploy

I use AWS with Elasticbeanstalk to deploy my applications, but I can't run the command rails console once ssh to my server and going to /var/app/current.
I tried many commands, without success :
bundle exec rails c
RAILS_ENV=development rails c
I got the follow error:
Could not find addressable-2.3.6 in any of the sources
Run `bundle install` to install missing gems.
But when running bundle install everything is fine.
This error is a huge issue to me as I can't use the whenever cron job.
Can you help me ?
PS : Gist of my Gemfile here
ran into similar problem and this is what solved my problem:
you may try sudo gem install bundler from your root and later move to app/current and try run rails c -e environment_name

Resources