Problems with Jekyll installation on Elementary OS

Hello for everyone! Thank you for this forum. Please, let me ask one question about Jekyll installation.

I’m trying to install Jekyll on my Laptop with Elementary OS (based on Linux Ubuntu 18.04 LTS).

I read official Jekyll documentation: First I’m installing ruby-full using command: sudo apt-get install ruby-full build-essential zlib1g-dev. And all is okay at this stage.

Then I’m trying to create .bashrc on my home folder. I write 3 commands:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc

and all is okay. But when I write 4 command: source ~/.bashrc, I see next errors:

bash: /home/ayagozman/.bashrc: line 171: syntax error near unexpected token `Install’

bash: /home/ayagozman/.bashrc: line 171: `esac# Install Ruby Gems to ~/gems’

I also attache a screenshot.

Please, can someone help me, whats going wrong there? Sorry for noob question and bad English.

hmm, i’m no good at linux.

It kind of looks like it doesn’t like the # in the first line - fairly sure that line is just a comment? try doing it with just lines 2 and 3. You will need to edit/delete the file that I think you created? is there a file named .bashrc? if so delete it and start again with just lines 2 and 3.

I assume it is safe to delete that file if it exists -but I suppose maybe not? little wierd that it says line 171, makes me think there is other stuff in that file, so maybe try to edit it to remove the first part?

your .bashrc didn’t end in a newline so when you appended the comment it ended up right next to a closing case statement. you’ll need to edit the file and add a newline after esac (or a space would suffice but the comment would be misplaced)