From e5ffa9e318a12fe6d7adc5dadf09ed05913945be Mon Sep 17 00:00:00 2001 From: james Date: Wed, 27 Dec 2023 00:01:23 -0600 Subject: [PATCH 01/20] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 443b97e..9c97c72 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # roda-templates -For the single file app template, really the only file you need is the config.ru and run it with pum. +For the single file app template, really the only file you need is the config.ru and run it with puma. ## Setup From 2151565e9c752b685ea350d7945024b9a6f8ce08 Mon Sep 17 00:00:00 2001 From: James Dinkel Date: Wed, 27 Dec 2023 18:19:21 -0600 Subject: [PATCH 02/20] Split up config.ru and added views --- Gemfile | 5 +++++ README.md | 32 ++++++++++++++++++++++++++++++-- app.rb | 24 ++++++++++++++++++++++++ config.ru | 18 ++++++------------ views/greeting.erb | 3 +++ views/index.erb | 3 +++ views/layout.erb | 18 ++++++++++++++++++ 7 files changed, 89 insertions(+), 14 deletions(-) create mode 100644 app.rb create mode 100644 views/greeting.erb create mode 100644 views/index.erb create mode 100644 views/layout.erb diff --git a/Gemfile b/Gemfile index fb482ca..3606de8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,9 @@ source 'https://rubygems.org' gem 'roda' +gem 'rack-unreloader' +gem 'tilt' +gem 'erubi' + +# change to gunicorn or passenger if you prefer: gem 'puma' diff --git a/README.md b/README.md index 9c97c72..42e3b86 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,18 @@ For the single file app template, really the only file you need is the config.ru and run it with puma. +## Views + +Next iteration: + +adding plugin csrf, and maybe public, assets +split out app routes from config.ru +set up view templates +add unreloader + +future iterations will add database, then authentication + + ## Setup ### Prereq installs @@ -13,8 +25,8 @@ Will need ruby; install it via package manager or a ruby manager like rbenv/ruby With this example, will basically just ignore the project's Gemfile. Debian 12 has a pretty current ruby version so just using it. ``` -sudo apt install ruby ruby-rack puma -sudo gem install roda +sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt +sudo gem install roda rack-unreloader ``` #### Option 2: Bundler @@ -46,3 +58,19 @@ For development, just run it like that. For production, probably want to set up ### Run it with systemd in production Copy the example myapp.service file to `/etc/systemd/system/` and edit accordingly. The example assumes a user named "myapp" with a group name "myapp", the application files are in `/opt/myapp/`, and puma is the system puma. + +### Notes + +## Unreloader + +This has puma reload with any file changes while you are working on the app, when in development mode. When puma is in production mode, it loads the app on startup like normal with no performance penalty. It's very useful during development and no reason to not leave it in. + +. + +Basically, you require the app from the config.ru, and then within you app files, any "require_relative" will be "Unreloader.require" instead, plus you do need to include the file extension. + +In config.ru, the "dev =" line stores true or false depending on the RACK_ENV environment variable (see above for changing from default development). Then the ":reload=>dev" uses the dev variable to tell Unreload to reload files or not. Lastly the "run" command uses dev variable to choose between running Unreloader, or bypass Unreloader and run App like normal in production. + +## Additional credit + +I took a lot of inspirations from Jeremy Evans [roda-sequel-stack](https://github.com/jeremyevans/roda-sequel-stack). Jeremy Evans is the author of Roda and also Unreloader, Sequel, and a ruby core contributor. diff --git a/app.rb b/app.rb new file mode 100644 index 0000000..76eeb17 --- /dev/null +++ b/app.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +require 'roda' +require 'tilt' +require 'tilt/erubi' + +class App < Roda + plugin :render, escape: true + plugin :route_csrf + + route do |r| + check_csrf! + + r.root do + view :index + end + + r.is String do |name| + @page_title = 'A Custom Greeting' + @name = name.capitalize + view :greeting + end + end +end + diff --git a/config.ru b/config.ru index 77fc7ae..4e24994 100644 --- a/config.ru +++ b/config.ru @@ -1,15 +1,9 @@ -require 'roda' -class App < Roda - route do |r| - r.root do - "

Hello, World!

" - end +dev = ENV['RACK_ENV'] == 'development' - r.is String do |name| - "

Hello, #{name.capitalize}!

" - end - end -end +require 'rack/unreloader' -run App +Unreloader = Rack::Unreloader.new(:subclasses=>%w'Roda', :reload=>dev){App} +Unreloader.require './app.rb' + +run(dev ? Unreloader : App) diff --git a/views/greeting.erb b/views/greeting.erb new file mode 100644 index 0000000..9de747b --- /dev/null +++ b/views/greeting.erb @@ -0,0 +1,3 @@ +

+ Hello, <%= @name %>! +

diff --git a/views/index.erb b/views/index.erb new file mode 100644 index 0000000..4762d4c --- /dev/null +++ b/views/index.erb @@ -0,0 +1,3 @@ +

+ Welcome to my new page! +

diff --git a/views/layout.erb b/views/layout.erb new file mode 100644 index 0000000..c5ec841 --- /dev/null +++ b/views/layout.erb @@ -0,0 +1,18 @@ + + + + + + <%= @page_title || "My Website" %> + + + +
+
+

<%= @page_title || 'Page Title Placeholder' %>

+ <% # maybe put a flash section here some day %> + <%== yield %> +
+
+ + From 971c5f2233ef500bd03111d5c8ef24cf22bacbec Mon Sep 17 00:00:00 2001 From: james Date: Wed, 27 Dec 2023 19:09:35 -0600 Subject: [PATCH 03/20] Update readme.md --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 42e3b86..83f577f 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,11 @@ For the single file app template, really the only file you need is the config.ru ## Views -Next iteration: +In this template, I've taken the single-file template and split up the config.ru to put routes and app logic in app.rb and call on templates to render proper html pages. `tilt` and `erubi` gems are added to do the rendering, and `rack-unreloader` gem is added to have puma automatically load file changes while running in development mode. -adding plugin csrf, and maybe public, assets -split out app routes from config.ru -set up view templates -add unreloader - -future iterations will add database, then authentication +My example html layout uses [Bulma](https://bulma.io/) to make it easier to make modern looking webpages. +Next Roda app template iterations will add database, then authentication. ## Setup @@ -69,8 +65,8 @@ This has puma reload with any file changes while you are working on the app, whe Basically, you require the app from the config.ru, and then within you app files, any "require_relative" will be "Unreloader.require" instead, plus you do need to include the file extension. -In config.ru, the "dev =" line stores true or false depending on the RACK_ENV environment variable (see above for changing from default development). Then the ":reload=>dev" uses the dev variable to tell Unreload to reload files or not. Lastly the "run" command uses dev variable to choose between running Unreloader, or bypass Unreloader and run App like normal in production. +In config.ru, the `dev =` line stores true or false depending on the RACK_ENV environment variable (see above for changing from default development). Then the `:reload=>dev` uses the dev variable to tell Unreload to reload files or not. Lastly the `run` command uses the dev variable to choose between running Unreloader, or bypass Unreloader and run App like normal in production. ## Additional credit -I took a lot of inspirations from Jeremy Evans [roda-sequel-stack](https://github.com/jeremyevans/roda-sequel-stack). Jeremy Evans is the author of Roda and also Unreloader, Sequel, and a ruby core contributor. +I took a lot of inspirations from Jeremy Evans [roda-sequel-stack](https://github.com/jeremyevans/roda-sequel-stack). Jeremy Evans is the author of Roda and also Unreloader, Sequel, and a ruby core contributor, among other things. From 1a3a4287b00acc054b1ef07526a569cd4b504939 Mon Sep 17 00:00:00 2001 From: James Dinkel Date: Thu, 28 Dec 2023 00:13:50 -0600 Subject: [PATCH 04/20] Getting ready to use database --- Gemfile | 6 ++++++ README.md | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 3606de8..6e8b26c 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,12 @@ gem 'roda' gem 'rack-unreloader' gem 'tilt' gem 'erubi' +gem 'sequel' + +# Change to whatever database you plan to use +gem 'sqlite3' +# gem 'pg' # will also want gem sequel-pg +# gem 'mysql2' # change to gunicorn or passenger if you prefer: gem 'puma' diff --git a/README.md b/README.md index 83f577f..e8d83d1 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ For the single file app template, really the only file you need is the config.ru and run it with puma. +## Database + ## Views In this template, I've taken the single-file template and split up the config.ru to put routes and app logic in app.rb and call on templates to render proper html pages. `tilt` and `erubi` gems are added to do the rendering, and `rack-unreloader` gem is added to have puma automatically load file changes while running in development mode. @@ -21,7 +23,7 @@ Will need ruby; install it via package manager or a ruby manager like rbenv/ruby With this example, will basically just ignore the project's Gemfile. Debian 12 has a pretty current ruby version so just using it. ``` -sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt +sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt ruby-sequel ruby-sqlite3 sudo gem install roda rack-unreloader ``` From bffbab8fbc8e0691f3d8375531a32ddb597d1edd Mon Sep 17 00:00:00 2001 From: James Dinkel Date: Thu, 28 Dec 2023 18:36:49 -0600 Subject: [PATCH 05/20] Added sequel with example setup --- Gemfile | 1 + README.md | 2 +- Rakefile | 33 +++++++++++++++++++++++++++++++ config.ru | 3 ++- db.rb | 4 ++++ migrate/001_create_users_table.rb | 11 +++++++++++ models.rb | 14 +++++++++++++ models/user.rb | 3 +++ views/index.erb | 2 +- 9 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 Rakefile create mode 100644 db.rb create mode 100644 migrate/001_create_users_table.rb create mode 100644 models.rb create mode 100644 models/user.rb diff --git a/Gemfile b/Gemfile index 6e8b26c..b668a39 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ gem 'rack-unreloader' gem 'tilt' gem 'erubi' gem 'sequel' +gem 'rake' # Change to whatever database you plan to use gem 'sqlite3' diff --git a/README.md b/README.md index e8d83d1..159cce8 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Will need ruby; install it via package manager or a ruby manager like rbenv/ruby With this example, will basically just ignore the project's Gemfile. Debian 12 has a pretty current ruby version so just using it. ``` -sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt ruby-sequel ruby-sqlite3 +sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt ruby-sequel ruby-sqlite3 rake sudo gem install roda rack-unreloader ``` diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..4a4ce07 --- /dev/null +++ b/Rakefile @@ -0,0 +1,33 @@ +namespace :db do + + migrator = lambda do |version| + require_relative 'db' + Sequel.extension :migration + Sequel::Migrator.apply(DB, 'migrate', version) + end + + namespace :migrate do + + desc "Perform migration up to latest migration available" + task :up do + migrator.call(nil) + end + + desc "Perform migration all the way down (erase all data)" + task :down do + migrator.call(0) + end + + end + + desc "Erase all data, then bring back to latest migration" + task :reset do + migrator.call(0) + Sequel::Migrator.apply(DB, 'migrate') + end + + #desc "Migrate to a specific version" + #task :migrate do |version| + #end + +end diff --git a/config.ru b/config.ru index 4e24994..1af6d15 100644 --- a/config.ru +++ b/config.ru @@ -3,7 +3,8 @@ dev = ENV['RACK_ENV'] == 'development' require 'rack/unreloader' -Unreloader = Rack::Unreloader.new(:subclasses=>%w'Roda', :reload=>dev){App} +Unreloader = Rack::Unreloader.new(:subclasses=>%w'Roda Sequel::Model', reload: dev, autoload: dev){App} +Unreloader.require './models.rb' Unreloader.require './app.rb' run(dev ? Unreloader : App) diff --git a/db.rb b/db.rb new file mode 100644 index 0000000..5c72eb9 --- /dev/null +++ b/db.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true +require 'sequel/core' + +DB = Sequel.connect('sqlite://temp.db') diff --git a/migrate/001_create_users_table.rb b/migrate/001_create_users_table.rb new file mode 100644 index 0000000..29d513d --- /dev/null +++ b/migrate/001_create_users_table.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +Sequel.migration do + change do + create_table(:users) do + primary_key :id + String :name, unique: true, null: false + end + end +end + diff --git a/models.rb b/models.rb new file mode 100644 index 0000000..33c6865 --- /dev/null +++ b/models.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true +require_relative 'db' +require 'sequel/model' + +if ENV['RACK_ENV'] == 'development' + Sequel::Model.cache_associations = false +end + +unless defined?(Unreloader) + require 'rack/unreloader' + Unreloader = Rack::Unreloader.new(reload: false, autoload: !ENV['NO_AUTOLOAD']) +end + +Unreloader.autoload('models'){|f| Sequel::Model.send(:camelize, File.basename(f).sub(/\.rb\z/, ''))} diff --git a/models/user.rb b/models/user.rb new file mode 100644 index 0000000..a4f2fa1 --- /dev/null +++ b/models/user.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true +class User < Sequel::Model +end diff --git a/views/index.erb b/views/index.erb index 4762d4c..31b3b2d 100644 --- a/views/index.erb +++ b/views/index.erb @@ -1,3 +1,3 @@

- Welcome to my new page! + Welcome to my new page! Running in <%= ENV['RACK_ENV'] %> mode!

From 14f1f3daa64dcdc56d6cdf2607da3857577f6055 Mon Sep 17 00:00:00 2001 From: James Dinkel Date: Thu, 28 Dec 2023 22:39:02 -0600 Subject: [PATCH 06/20] Added new views that use the database --- .gitignore | 2 ++ app.rb | 15 +++++++++++---- views/users.erb | 5 +++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 views/users.erb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb44c0a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.rake_tasks~ +/temp.db diff --git a/app.rb b/app.rb index 76eeb17..8c321e0 100644 --- a/app.rb +++ b/app.rb @@ -14,10 +14,17 @@ class App < Roda view :index end - r.is String do |name| - @page_title = 'A Custom Greeting' - @name = name.capitalize - view :greeting + r.is 'users' do + @users = User.order(:id) + view :users + end + + r.on 'hello' do + r.is String do |name| + @page_title = 'A Custom Greeting' + @name = name.capitalize + view :greeting + end end end end diff --git a/views/users.erb b/views/users.erb new file mode 100644 index 0000000..13cc1e7 --- /dev/null +++ b/views/users.erb @@ -0,0 +1,5 @@ +<% for u in @users do %> +

+ Hello, <%= u.name %>! You're #<%= u.id %>! +

+<% end %> From 6c8e4f809d2df063f3302a973423ef583defdddf Mon Sep 17 00:00:00 2001 From: James Date: Thu, 5 Sep 2024 23:23:57 -0500 Subject: [PATCH 07/20] Update README.md fix spelling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 443b97e..9c97c72 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # roda-templates -For the single file app template, really the only file you need is the config.ru and run it with pum. +For the single file app template, really the only file you need is the config.ru and run it with puma. ## Setup From 5a91e0d0ddc6a74bcac0f568f4946b599cbddcbb Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 14:52:56 -0500 Subject: [PATCH 08/20] Expanded setup instructions in Readme. --- README.md | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 159cce8..ca3abc2 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,17 @@ Next Roda app template iterations will add database, then authentication. ## Setup +### Get git + +``` +sudo apt install git +git config --global user.email "myemail@gmail.com" +git config --global user.name "Full Name" +git config --global credential.helper "cache" + +git clone https://path/to/project.git +``` + ### Prereq installs Will need ruby; install it via package manager or a ruby manager like rbenv/ruby-build. Will need the roda gem, and then an application server such as puma (recommended), gunicorn, or passenger. My examples will use system ruby and puma. @@ -25,18 +36,41 @@ With this example, will basically just ignore the project's Gemfile. Debian 12 ``` sudo apt install ruby ruby-rack puma ruby-erubi ruby-tilt ruby-sequel ruby-sqlite3 rake sudo gem install roda rack-unreloader + +cd my-project ``` -#### Option 2: Bundler +#### Option 2a: Bundler system package -Run the bundle command from the project's root directory +Run the bundle install command from the project's root directory ``` -sudo apt install ruby ruby-bundler +sudo apt install ruby ruby-bundler ruby-dev gcc pkgconf make g++ bundle config set --local path 'vendor/bundle' + +cd my-project bundle install ``` +#### Option 2b: Bundler system gem (recommended) + +Similar to above but might as well use the gem install to get the latest bundler. The Debian apt packaged bundler is currently a bit outdated and missing some features compared to the latest. + +``` +sudo apt install ruby ruby-dev gcc pkgconf make g++ +echo 'gem: --no-document' >> ~/.gemrc +sudo cp ~/.gemrc /root/ +sudo gem install bundler +bundle config set --local path 'vendor/bundle' + +cd my-project +bundle install +``` + +#### Option 3: Rbenv Ruby + +Todo + ## Run it In the project root directory: From c05c3d3a89973d75e657aea520b065fa6901714d Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 15:10:17 -0500 Subject: [PATCH 09/20] Update views/layout.erb for bulma 1.0.2 --- views/layout.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/layout.erb b/views/layout.erb index c5ec841..3ab9311 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -1,16 +1,16 @@ - + <%= @page_title || "My Website" %> - +
-

<%= @page_title || 'Page Title Placeholder' %>

- <% # maybe put a flash section here some day %> +

<%= @page_title || 'Page Title Placeholder' %>

+ <% # maybe put a flash section here some day, what Bulma calls the Hero component I think %> <%== yield %>
From 57462f98fcfc8fd7f6154025ad0af824e45fceff Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 15:43:52 -0500 Subject: [PATCH 10/20] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca3abc2..8012f40 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,10 @@ Run the bundle install command from the project's root directory ``` sudo apt install ruby ruby-bundler ruby-dev gcc pkgconf make g++ -bundle config set --local path 'vendor/bundle' +echo 'gem: --no-document' >> ~/.gemrc +sudo cp ~/.gemrc /root/ +bundle config set --global path 'vendor/bundle' +sudo cp -r .bundle /root/ cd my-project bundle install @@ -61,7 +64,8 @@ sudo apt install ruby ruby-dev gcc pkgconf make g++ echo 'gem: --no-document' >> ~/.gemrc sudo cp ~/.gemrc /root/ sudo gem install bundler -bundle config set --local path 'vendor/bundle' +bundle config set --global path 'vendor/bundle' +sudo cp -r .bundle /root/ cd my-project bundle install From 10bcb49b56e4434b5df8d72bd0dd0f206123049f Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 15:50:21 -0500 Subject: [PATCH 11/20] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8012f40..c36f07e 100644 --- a/README.md +++ b/README.md @@ -80,12 +80,18 @@ Todo In the project root directory: ``` +bundle exec puma + +# or if you did not use bundler to install puma... puma ``` This default to development mode. Run it in production mode with: ``` +RACK_ENV=production bundle exec puma + +# or if you did not install puma RACK_ENV=production puma ``` @@ -93,7 +99,7 @@ For development, just run it like that. For production, probably want to set up ### Run it with systemd in production -Copy the example myapp.service file to `/etc/systemd/system/` and edit accordingly. The example assumes a user named "myapp" with a group name "myapp", the application files are in `/opt/myapp/`, and puma is the system puma. +Copy the example myapp.service file to `/etc/systemd/system/` and edit accordingly. The example assumes a user named "myapp" with a group name "myapp", the application files are in `/opt/myapp/`, and puma is the system puma. If you installed puma with bundler, the exe will be at `/opt/myapp/vendor/bundle/ruby/3.1.0/bin/puma`. ### Notes From 3d679586d80a3763f4fa6844ad9c2981fccf510f Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 16:59:26 -0500 Subject: [PATCH 12/20] Update views/greeting.erb --- views/greeting.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/greeting.erb b/views/greeting.erb index 9de747b..15c8d7a 100644 --- a/views/greeting.erb +++ b/views/greeting.erb @@ -1,3 +1,3 @@ -

+

Hello, <%= @name %>!

From 15e6c8dff89f251974bb01bf87c83e3c14654287 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 17:00:55 -0500 Subject: [PATCH 13/20] Update views/index.erb --- views/index.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.erb b/views/index.erb index 31b3b2d..25704e6 100644 --- a/views/index.erb +++ b/views/index.erb @@ -1,3 +1,3 @@ -

+

Welcome to my new page! Running in <%= ENV['RACK_ENV'] %> mode!

From 9f00a34f7db27f465046ef3e62be01d2b41f5dad Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 17:01:38 -0500 Subject: [PATCH 14/20] Update views/layout.erb --- views/layout.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/views/layout.erb b/views/layout.erb index 3ab9311..b18438a 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -9,8 +9,9 @@
-

<%= @page_title || 'Page Title Placeholder' %>

- <% # maybe put a flash section here some day, what Bulma calls the Hero component I think %> +

+ <%= @page_title || 'Page Title Placeholder' %> +

<%== yield %>
From 4f3d003a35529d61c98d1f942dca0ebe7b478f66 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Nov 2024 17:03:48 -0500 Subject: [PATCH 15/20] Update views/users.erb --- views/users.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/users.erb b/views/users.erb index 13cc1e7..7fd2caf 100644 --- a/views/users.erb +++ b/views/users.erb @@ -1,5 +1,5 @@ <% for u in @users do %> -

+

Hello, <%= u.name %>! You're #<%= u.id %>!

<% end %> From 0cd5093976a73f793a182b12894d827385775fb5 Mon Sep 17 00:00:00 2001 From: james Date: Sat, 2 Nov 2024 22:36:20 -0500 Subject: [PATCH 16/20] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cb44c0a..4530e79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.rake_tasks~ /temp.db +/vendor/ \ No newline at end of file From 2024a8367bc31fca7ae044ed063fce1c2a9ec074 Mon Sep 17 00:00:00 2001 From: james Date: Sat, 2 Nov 2024 23:08:12 -0500 Subject: [PATCH 17/20] link to latest bulma 1.x --- views/layout.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/layout.erb b/views/layout.erb index b18438a..4869da1 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -4,7 +4,7 @@ <%= @page_title || "My Website" %> - +
From a9f4b05b1625c0616b48d80ab652fd82757bb571 Mon Sep 17 00:00:00 2001 From: james Date: Mon, 4 Nov 2024 23:25:40 -0600 Subject: [PATCH 18/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c36f07e..aee5c23 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ cd my-project Run the bundle install command from the project's root directory ``` -sudo apt install ruby ruby-bundler ruby-dev gcc pkgconf make g++ +sudo apt install ruby ruby-bundler ruby-dev gcc pkgconf make g++ libyaml-dev echo 'gem: --no-document' >> ~/.gemrc sudo cp ~/.gemrc /root/ bundle config set --global path 'vendor/bundle' @@ -60,7 +60,7 @@ bundle install Similar to above but might as well use the gem install to get the latest bundler. The Debian apt packaged bundler is currently a bit outdated and missing some features compared to the latest. ``` -sudo apt install ruby ruby-dev gcc pkgconf make g++ +sudo apt install ruby ruby-dev gcc pkgconf make g++ libyaml-dev echo 'gem: --no-document' >> ~/.gemrc sudo cp ~/.gemrc /root/ sudo gem install bundler From 77bdebd0b1be71f8856ad9c59e780a920cde1097 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 7 Nov 2024 17:46:21 -0600 Subject: [PATCH 19/20] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aee5c23..7994bbc 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ cd my-project Run the bundle install command from the project's root directory ``` -sudo apt install ruby ruby-bundler ruby-dev gcc pkgconf make g++ libyaml-dev +sudo apt install ruby ruby-bundler ruby-dev gcc pkgconf make g++ libyaml-dev libffi-dev echo 'gem: --no-document' >> ~/.gemrc sudo cp ~/.gemrc /root/ bundle config set --global path 'vendor/bundle' @@ -60,7 +60,7 @@ bundle install Similar to above but might as well use the gem install to get the latest bundler. The Debian apt packaged bundler is currently a bit outdated and missing some features compared to the latest. ``` -sudo apt install ruby ruby-dev gcc pkgconf make g++ libyaml-dev +sudo apt install ruby ruby-dev gcc pkgconf make g++ libyaml-dev # zlib1g-dev libffi-dev #(for rails stuff) echo 'gem: --no-document' >> ~/.gemrc sudo cp ~/.gemrc /root/ sudo gem install bundler From f4780106996c444622d36e2b8d41ca6a86f87643 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 25 Jun 2025 22:42:56 -0500 Subject: [PATCH 20/20] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4530e79..aa03a48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.rake_tasks~ /temp.db -/vendor/ \ No newline at end of file +/vendor/ +/bin/ \ No newline at end of file