You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+95-4Lines changed: 95 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,90 @@ Please note the following third-party elements and content:
34
34
For details on the open source components included in the micro-ros.github.io repository, see the file [3rd-party-licenses.txt](3rd-party-licenses.txt).
35
35
36
36
## Running locally
37
+
This project uses Jekyll, the static site generator behind GitHub Pages (see [Jekyll Quickstart](https://jekyllrb.com/docs/) for more information).
38
+
To preview the site locally, you’ll need to install Ruby, Jekyll, and the project dependencies.
39
+
40
+
### Prerequisites
41
+
Make sure your system has the necessary build tools and libraries for compiling Ruby and Jekyll dependencies:
42
+
43
+
```bash
44
+
sudo apt update
45
+
sudo apt install -y \
46
+
libffi-dev \
47
+
libyaml-dev \
48
+
git
49
+
```
50
+
51
+
### Install Ruby via rbenv
52
+
We recommend using rbenv to manage Ruby versions locally:
Jekyll and its plugins require UTF-8 encoding to handle special characters correctly:
74
+
75
+
```bash
76
+
export LC_ALL="C.UTF-8"
77
+
export LANG="en_US.UTF-8"
78
+
export LANGUAGE="en_US.UTF-8"
79
+
```
80
+
81
+
### Install Jekyll and Bundler
82
+
83
+
```bash
84
+
gem install jekyll bundler
85
+
```
86
+
87
+
Using a Bundler version different from the one recorded in the `Gemfile.lock` (currently 2.7.2) may lead to compatibility issues.
88
+
You can check your installed Bundler version by running:
89
+
90
+
```bash
91
+
bundler -v
92
+
```
93
+
94
+
### Clone repository and dependencies
95
+
For the includes of README.md files on the micro-ROS demos (in the tutorials chapter) from the corresponding repositories, please init and update the corresponding git submodules:
# Fetch tutorials and demos included via submodules
102
+
git submodule update --init --recursive
103
+
```
104
+
105
+
### Install project dependencies
106
+
After installing Jekyll, install all dependencies by running:
107
+
108
+
```bash
109
+
bundle install
110
+
```
111
+
112
+
### Run the Jekyll server
113
+
You may launch Jekyll to build and serve the website continuously by running:
114
+
115
+
```bash
116
+
bundle exec jekyll serve
117
+
```
118
+
119
+
By default, the site will be available at http://localhost:4000
37
120
38
-
To test locally, you need a local version of Jekyll, the site-generation
39
-
engine used by GitHub Pages. See [Jekyll Quickstart](https://jekyllrb.com/docs/)
40
-
for installation instructions.
41
121
42
122
After installing Jekyll, install all dependencies by running
43
123
```bash
@@ -49,7 +129,18 @@ Then, you may launch Jekyll to build and serve the website continuously by
49
129
bundle exec jekyll serve
50
130
```
51
131
52
-
For the includes of README.md files on the micro-ROS demos (in the tutorials chapter) from the corresponding repositories, please init and update the corresponding git submodules (i.e. `git submodule init ; git submodule update`).
132
+
### (Optional) Regenerate `Gemfile.lock` file
133
+
134
+
When updating Ruby or Bundler version it is possible that dependencies no longer resolve cleanly, causing `bundle install` to fail.
135
+
It can be fixed by regenerating the `Gemfile.lock` file and commiting the changes:
136
+
137
+
```bash
138
+
rm Gemfile.lock
139
+
140
+
bundle install
141
+
```
142
+
143
+
This will resolve all dependencies defined in your `Gemfile` and generate a new `Gemfile.lock` consistent with your current Bundler version and available gems.
0 commit comments