Skip to content

Commit e7b600b

Browse files
authored
Merge pull request academicpages#2814 from librautoo/master
update readme file
2 parents d04ee55 + ef6c1ce commit e7b600b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,29 @@ When you are initially working your website, it is very useful to be able to pre
2626
```bash
2727
sudo apt install ruby-dev ruby-bundler nodejs
2828
```
29+
If you see error `Unable to locate package ruby-bundler`, `Unable to locate package nodejs `, run the following:
30+
```bash
31+
sudo apt update && sudo apt upgrade -y
32+
```
33+
then try run `sudo apt install ruby-dev ruby-bundler nodejs` again.
34+
2935
On MacOS the commands are:
3036
```bash
3137
brew install ruby
3238
brew install node
3339
gem install bundler
3440
```
3541
1. Run `bundle install` to install ruby dependencies. If you get errors, delete Gemfile.lock and try again.
42+
43+
If you see file permission error like `Fetching bundler-2.6.3.gem ERROR: While executing gem (Gem::FilePermissionError) You don't have write permissions for the /var/lib/gems/3.2.0 directory.` or `Bundler::PermissionError: There was an error while trying to write to /usr/local/bin.`
44+
Install Gems Locally (Recommended):
45+
```bash
46+
bundle config set --local path 'vendor/bundle'
47+
```
48+
then try run `bundle install` again. If succeeded, you should see a folder called `vendor` and open `.gitignore` then add `vendor` inside it.
49+
3650
1. Run `jekyll serve -l -H localhost` to generate the HTML and serve it from `localhost:4000` the local server will automatically rebuild and refresh the pages on change.
51+
You may also try `bundle exec jekyll serve -l -H localhost` to ensure jekyll to use specific dependencies on your own local machine.
3752
3853
If you are running on Linux it may be necessary to install some additional dependencies prior to being able to run locally: `sudo apt install build-essential gcc make`
3954

0 commit comments

Comments
 (0)