I am trying to setup rake via this doc.
http://octopress.org/docs/setup/
But I get some errors.
ikhthiandor@ikhthiandor-Satellite-L450:/opt/octopress$ rake install
## Copying classic theme into ./source and ./sass
mkdir -p source
rake aborted!
Permission denied - source
Tasks: TOP => install
(See full trace by running task with --trace)
With sudo I get this output.
ikhthiandor@ikhthiandor-Satellite-L450:/opt/octopress$ sudo rake install
rake aborted!
no such file to load -- bundler/setup
(See full trace by running task with --trace)
Here is a list of files in the directory.
ikhthiandor@ikhthiandor-Satellite-L450:/opt/octopress$ ls -a
. config.ru .git Rakefile .slugignore
.. _config.yml .gitignore .rbenv-version .themes
CHANGELOG.markdown Gemfile plugins README.markdown
config.rb Gemfile.lock .powrc .rvmrc
How can I solve the problem?
Ikhthiandor: Looks like you are a beginner in the ruby/rails world.
By running the
rake installcommand, you are installing the default octopress theme using the rake tool. Nottrying to setup rakeas you mention in the question.The first error (
Permission denied - sourcewhen tryingmkdir -p source– as you correctly guessed – is because the user doesn’t have permissions to create that directory.The second error (
no such file to load -- bundler/setup) is because the previousinstall dependenciessteps are not performed correctly (for the user running this command).The install dependencies steps to be completed successfully are:
I am guessing you ran these steps successfully as ‘ikhthiandor’ user, so the bundler gem is not available for the ‘sudo’ user.
You can fix this by either of the following options:
/opt/octopressfolder so that ‘ikhthiandor’ user has rights to create sub-folders/files within.Best practice would be to use either rvm or rbenv to manage custom installations of ruby environments per user (and not do everything as super user).
If you are indeed a fresher in the ruby-rails world, and want to step up your knowledge of the tools and the best practices in the ruby/rails world, I suggest browsing through the first few chapters of the Ruby on Rails Tutorial book that is available for free on-line.
HTH