Skip to content

Commit 683ce19

Browse files
authored
Update Rails and Ruby (heroku#115)
* Update Rails and Ruby - Ruby 3.2 has been released, by setting the maximum to `< 3.3` developers can use Ruby 3.2 with this example app. - Update Rails patch level 7.0.4.2 is the latest patch level of Rails - Puma got rid of the DefaultRackup constant so we can remove it too. This is now the default behavior. - Bump gems via `bundle update` * Remove docker instructions from README Docker is not recommended and these instructions haven't been updated for quite some time. * Add check step before `heroku create` If you run the `heroku create` command in the wrong directory, the rest of the commands won't work. Add a checksum step before to help users ensure they're in the correct directory.
1 parent 6d817b5 commit 683ce19

File tree

4 files changed

+101
-116
lines changed

4 files changed

+101
-116
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
source 'https://rubygems.org'
2-
ruby '>= 3.1', '< 3.2'
2+
ruby '>= 3.1', '< 3.3'
33

44
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5-
gem 'rails', '~> 7.0.4'
5+
gem 'rails', '~> 7.0.4.2 '
66
# Use postgresql as the database for Active Record
77
gem 'pg', '~> 1.3.5'
88
# Use SCSS for stylesheets

Gemfile.lock

Lines changed: 89 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,72 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.0.4)
5-
actionpack (= 7.0.4)
6-
activesupport (= 7.0.4)
4+
actioncable (7.0.4.2)
5+
actionpack (= 7.0.4.2)
6+
activesupport (= 7.0.4.2)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
9-
actionmailbox (7.0.4)
10-
actionpack (= 7.0.4)
11-
activejob (= 7.0.4)
12-
activerecord (= 7.0.4)
13-
activestorage (= 7.0.4)
14-
activesupport (= 7.0.4)
9+
actionmailbox (7.0.4.2)
10+
actionpack (= 7.0.4.2)
11+
activejob (= 7.0.4.2)
12+
activerecord (= 7.0.4.2)
13+
activestorage (= 7.0.4.2)
14+
activesupport (= 7.0.4.2)
1515
mail (>= 2.7.1)
1616
net-imap
1717
net-pop
1818
net-smtp
19-
actionmailer (7.0.4)
20-
actionpack (= 7.0.4)
21-
actionview (= 7.0.4)
22-
activejob (= 7.0.4)
23-
activesupport (= 7.0.4)
19+
actionmailer (7.0.4.2)
20+
actionpack (= 7.0.4.2)
21+
actionview (= 7.0.4.2)
22+
activejob (= 7.0.4.2)
23+
activesupport (= 7.0.4.2)
2424
mail (~> 2.5, >= 2.5.4)
2525
net-imap
2626
net-pop
2727
net-smtp
2828
rails-dom-testing (~> 2.0)
29-
actionpack (7.0.4)
30-
actionview (= 7.0.4)
31-
activesupport (= 7.0.4)
29+
actionpack (7.0.4.2)
30+
actionview (= 7.0.4.2)
31+
activesupport (= 7.0.4.2)
3232
rack (~> 2.0, >= 2.2.0)
3333
rack-test (>= 0.6.3)
3434
rails-dom-testing (~> 2.0)
3535
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36-
actiontext (7.0.4)
37-
actionpack (= 7.0.4)
38-
activerecord (= 7.0.4)
39-
activestorage (= 7.0.4)
40-
activesupport (= 7.0.4)
36+
actiontext (7.0.4.2)
37+
actionpack (= 7.0.4.2)
38+
activerecord (= 7.0.4.2)
39+
activestorage (= 7.0.4.2)
40+
activesupport (= 7.0.4.2)
4141
globalid (>= 0.6.0)
4242
nokogiri (>= 1.8.5)
43-
actionview (7.0.4)
44-
activesupport (= 7.0.4)
43+
actionview (7.0.4.2)
44+
activesupport (= 7.0.4.2)
4545
builder (~> 3.1)
4646
erubi (~> 1.4)
4747
rails-dom-testing (~> 2.0)
4848
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49-
activejob (7.0.4)
50-
activesupport (= 7.0.4)
49+
activejob (7.0.4.2)
50+
activesupport (= 7.0.4.2)
5151
globalid (>= 0.3.6)
52-
activemodel (7.0.4)
53-
activesupport (= 7.0.4)
54-
activerecord (7.0.4)
55-
activemodel (= 7.0.4)
56-
activesupport (= 7.0.4)
57-
activestorage (7.0.4)
58-
actionpack (= 7.0.4)
59-
activejob (= 7.0.4)
60-
activerecord (= 7.0.4)
61-
activesupport (= 7.0.4)
52+
activemodel (7.0.4.2)
53+
activesupport (= 7.0.4.2)
54+
activerecord (7.0.4.2)
55+
activemodel (= 7.0.4.2)
56+
activesupport (= 7.0.4.2)
57+
activestorage (7.0.4.2)
58+
actionpack (= 7.0.4.2)
59+
activejob (= 7.0.4.2)
60+
activerecord (= 7.0.4.2)
61+
activesupport (= 7.0.4.2)
6262
marcel (~> 1.0)
6363
mini_mime (>= 1.1.0)
64-
activesupport (7.0.4)
64+
activesupport (7.0.4.2)
6565
concurrent-ruby (~> 1.0, >= 1.0.2)
6666
i18n (>= 1.6, < 2)
6767
minitest (>= 5.1)
6868
tzinfo (~> 2.0)
69-
bootsnap (1.12.0)
69+
bootsnap (1.16.0)
7070
msgpack (~> 1.2)
7171
builder (3.2.4)
7272
coffee-rails (5.0.0)
@@ -76,43 +76,48 @@ GEM
7676
coffee-script-source
7777
execjs
7878
coffee-script-source (1.12.2)
79-
concurrent-ruby (1.1.10)
79+
concurrent-ruby (1.2.2)
8080
crass (1.0.6)
81-
erubi (1.10.0)
81+
date (3.3.3)
82+
erubi (1.12.0)
8283
execjs (2.8.1)
8384
ffi (1.15.5)
84-
globalid (1.0.1)
85+
globalid (1.1.0)
8586
activesupport (>= 5.0)
8687
i18n (1.12.0)
8788
concurrent-ruby (~> 1.0)
8889
jbuilder (2.11.5)
8990
actionview (>= 5.0.0)
9091
activesupport (>= 5.0.0)
91-
jquery-rails (4.5.0)
92+
jquery-rails (4.5.1)
9293
rails-dom-testing (>= 1, < 3)
9394
railties (>= 4.2.0)
9495
thor (>= 0.14, < 2.0)
95-
listen (3.7.1)
96+
listen (3.8.0)
9697
rb-fsevent (~> 0.10, >= 0.10.3)
9798
rb-inotify (~> 0.9, >= 0.9.10)
9899
loofah (2.19.1)
99100
crass (~> 1.0.2)
100101
nokogiri (>= 1.5.9)
101-
mail (2.7.1)
102+
mail (2.8.1)
102103
mini_mime (>= 0.1.1)
104+
net-imap
105+
net-pop
106+
net-smtp
103107
marcel (1.0.2)
104108
method_source (1.0.0)
105109
mini_mime (1.1.2)
106110
mini_portile2 (2.8.1)
107111
minitest (5.17.0)
108-
msgpack (1.5.2)
109-
net-imap (0.3.1)
112+
msgpack (1.6.0)
113+
net-imap (0.3.4)
114+
date
110115
net-protocol
111116
net-pop (0.1.2)
112117
net-protocol
113-
net-protocol (0.1.3)
118+
net-protocol (0.2.1)
114119
timeout
115-
net-smtp (0.3.2)
120+
net-smtp (0.3.3)
116121
net-protocol
117122
nio4r (2.5.8)
118123
nokogiri (1.14.2)
@@ -121,45 +126,45 @@ GEM
121126
nokogiri (1.14.2-x86_64-linux)
122127
racc (~> 1.4)
123128
pg (1.3.5)
124-
psych (4.0.4)
129+
psych (5.1.0)
125130
stringio
126-
puma (5.6.4)
131+
puma (6.1.1)
127132
nio4r (~> 2.0)
128133
racc (1.6.2)
129134
rack (2.2.6.2)
130-
rack-test (1.1.0)
131-
rack (>= 1.0, < 3)
132-
rails (7.0.4)
133-
actioncable (= 7.0.4)
134-
actionmailbox (= 7.0.4)
135-
actionmailer (= 7.0.4)
136-
actionpack (= 7.0.4)
137-
actiontext (= 7.0.4)
138-
actionview (= 7.0.4)
139-
activejob (= 7.0.4)
140-
activemodel (= 7.0.4)
141-
activerecord (= 7.0.4)
142-
activestorage (= 7.0.4)
143-
activesupport (= 7.0.4)
135+
rack-test (2.0.2)
136+
rack (>= 1.3)
137+
rails (7.0.4.2)
138+
actioncable (= 7.0.4.2)
139+
actionmailbox (= 7.0.4.2)
140+
actionmailer (= 7.0.4.2)
141+
actionpack (= 7.0.4.2)
142+
actiontext (= 7.0.4.2)
143+
actionview (= 7.0.4.2)
144+
activejob (= 7.0.4.2)
145+
activemodel (= 7.0.4.2)
146+
activerecord (= 7.0.4.2)
147+
activestorage (= 7.0.4.2)
148+
activesupport (= 7.0.4.2)
144149
bundler (>= 1.15.0)
145-
railties (= 7.0.4)
150+
railties (= 7.0.4.2)
146151
rails-dom-testing (2.0.3)
147152
activesupport (>= 4.2.0)
148153
nokogiri (>= 1.6)
149-
rails-html-sanitizer (1.4.3)
150-
loofah (~> 2.3)
151-
railties (7.0.4)
152-
actionpack (= 7.0.4)
153-
activesupport (= 7.0.4)
154+
rails-html-sanitizer (1.5.0)
155+
loofah (~> 2.19, >= 2.19.1)
156+
railties (7.0.4.2)
157+
actionpack (= 7.0.4.2)
158+
activesupport (= 7.0.4.2)
154159
method_source
155160
rake (>= 12.2)
156161
thor (~> 1.0)
157162
zeitwerk (~> 2.5)
158163
rake (13.0.6)
159-
rb-fsevent (0.11.1)
164+
rb-fsevent (0.11.2)
160165
rb-inotify (0.10.1)
161166
ffi (~> 1.0)
162-
rdoc (6.4.0)
167+
rdoc (6.5.0)
163168
psych (>= 4.0.0)
164169
sass-rails (6.0.0)
165170
sassc-rails (~> 2.1, >= 2.1.1)
@@ -171,31 +176,31 @@ GEM
171176
sprockets (> 3.0)
172177
sprockets-rails
173178
tilt
174-
sdoc (2.4.0)
179+
sdoc (2.6.1)
175180
rdoc (>= 5.0)
176-
spring (4.0.0)
177-
sprockets (4.0.3)
181+
spring (4.1.1)
182+
sprockets (4.2.0)
178183
concurrent-ruby (~> 1.0)
179-
rack (> 1, < 3)
184+
rack (>= 2.2.4, < 4)
180185
sprockets-rails (3.4.2)
181186
actionpack (>= 5.2)
182187
activesupport (>= 5.2)
183188
sprockets (>= 3.0.0)
184-
stringio (3.0.2)
189+
stringio (3.0.5)
185190
thor (1.2.1)
186-
tilt (2.0.10)
187-
timeout (0.3.0)
191+
tilt (2.1.0)
192+
timeout (0.3.2)
188193
turbolinks (5.2.1)
189194
turbolinks-source (~> 5.2)
190195
turbolinks-source (5.2.0)
191-
tzinfo (2.0.5)
196+
tzinfo (2.0.6)
192197
concurrent-ruby (~> 1.0)
193198
uglifier (4.2.0)
194199
execjs (>= 0.3.0, < 3)
195200
websocket-driver (0.7.5)
196201
websocket-extensions (>= 0.1.0)
197202
websocket-extensions (0.1.5)
198-
zeitwerk (2.5.4)
203+
zeitwerk (2.6.7)
199204

200205
PLATFORMS
201206
ruby
@@ -209,15 +214,15 @@ DEPENDENCIES
209214
listen
210215
pg (~> 1.3.5)
211216
puma
212-
rails (~> 7.0.4)
217+
rails (~> 7.0.4.2)
213218
sass-rails
214219
sdoc
215220
spring
216221
turbolinks
217222
uglifier
218223

219224
RUBY VERSION
220-
ruby 3.1.2p20
225+
ruby 3.1.3p185
221226

222227
BUNDLED WITH
223-
2.3.24
228+
2.4.7

README.md

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ By default, apps use Eco dynos if you are subscribed to Eco. Otherwise, it defau
2626

2727
Eligible students can apply for platform credits through our new [Heroku for GitHub Students program](https://blog.heroku.com/github-student-developer-program).
2828

29+
Ensure you're in the correct directory:
30+
31+
```sh
32+
$ ls
33+
Gemfile Procfile Rakefile app.json config db log public tmp
34+
Gemfile.lock README.md app bin config.ru lib package.json test vendor
35+
```
36+
37+
You should see a `Gemfile` file. Then run:
38+
2939
```sh
3040
$ heroku create
3141
$ git push heroku main
@@ -37,35 +47,6 @@ or
3747

3848
[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
3949

40-
## Docker
41-
42-
The app can be run and tested using the [Heroku Docker CLI plugin](https://devcenter.heroku.com/articles/local-development-with-docker-compose).
43-
44-
Make sure the plugin is installed:
45-
46-
heroku plugins:install heroku-docker
47-
48-
Configure Docker and Docker Compose:
49-
50-
heroku docker:init
51-
52-
And run the app locally:
53-
54-
docker-compose up web
55-
56-
The app will now be available on the Docker daemon IP on port 8080.
57-
58-
To work with the local database and do migrations, you can open a shell:
59-
60-
docker-compose run shell
61-
bundle exec rake db:migrate
62-
63-
You can also use Docker to release to Heroku:
64-
65-
heroku create
66-
heroku docker:release
67-
heroku open
68-
6950
## Documentation
7051

7152
For more information about using Ruby on Heroku, see these Dev Center articles:

config/puma.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
preload_app!
66

7-
rackup DefaultRackup
87
port ENV.fetch("PORT") { 3000 }
98
environment ENV.fetch("RAILS_ENV") { "development" }
109

0 commit comments

Comments
 (0)