Rake aborted ! Issue installing Octopress - ruby

I m trying to install the Octopress on my windows. As per their Tutorial on their website. But when I type the command
rake install
It gives me the following error
C:\Documents and Settings\admin\octopress>rake install
rake aborted!
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2. U
sing bundle exec may solve this.
(See full trace by running task with --trace)
And as the error says I need to install rake 0.9.2
I tried it doing with the following command.
C:\Documents and Settings\admin\octopress>gem install rack -v=0.9.2.0
ERROR: Could not find a valid gem 'rack' (= 0.9.2.0) in any repository
ERROR: Possible alternatives: rack
I already have Ruby & Gems installed on my PC. But I m not able to figure out how to solve this issue. How do I even use the "bundle exec" to install Octopress ?

You probably need to use the bundle exec in this way
bundle exec rake install
This might just solve you problem.

I solve this with bundle update
it's a dependency problem and not big deal

The first time you spelled it rake and the second time you spelled it rack

First update the documentation to say,
bundle exec rake install
Then update the Gemfile.lock with,
bundle update

Related

rake neo4j:install[community-latest] - The `neo4j-rake_tasks` gem is no longer a dependency of the `neo4j-core` gem

I am following this instruction, "Getting Started with Neo4j and Ruby", https://neo4j.com/developer/ruby-course/.
Here is how you would setup your asset portal Rails app:
rails new asset_portal -m http://neo4jrb.io/neo4j/neo4j.rb -O
cd asset_portal
rake neo4j:install[community-latest]
rake neo4j:start
But after I run
rake neo4j:install[community-latest]
I got this note
The `neo4j-rake_tasks` gem is no longer a dependency of the `neo4j-core` gem.
If you would like to use the rake tasks, you will need to explicitly include the `neo4j-rake_tasks` gem in your project.
Please note that the `neo4j-rake_tasks` gem is only for development and test environments (NOT for production).
Be sure to require the `neo4j-rake_tasks` gem AFTER the `neo4j-core` and `neo4j` gems.
For more details see the Neo4j.rb documentation
What can I do now to make this statement, rake neo4j:install[community-latest], work?
Thanks!
only add the flowing snippet
gem 'neo4j-rake_tasks'
bundle install
Hopefully would solve your problem.
I need to add the following lines to GemFile
gem 'neo4j-core'
gem 'neo4j-rake_tasks'
And then run the commands
bundle install
rake neo4j:install[community-latest]
rake neo4j:start

Rake aborted when running "rake install" for Octopress?

I want to build Octopress on my Windows 8.1 system.
I installed Ruby 2.0.0, and DevKit in C:\devKit, then ran gem install bundler and bundle install.
They run successfully but when I run rake install, I always get an error message like:
rake aborted! cannot load such file --
C:/Users/username/Documents/GitHub/octopress/Rakefile
I think the problem is that my username is Chinese, but could there be another problem?
I've tried bundle update or bundle exec rake install but it didn't work.
I hope someone can help me.
Just to clean up this question and to supply the right answer.
I think the problem is that my username is Chinese, but could there be another problem?
The problem is that that current user has non English characters as the windows username.
This cause error and rake cant load the desired file.
Changing teh name or moving the the Octopress to a different folder fixed the problem.

Unresolved specs during Gem::Specification.reset:

When launching Guard, I'm getting this output:
$ guard
WARN: Unresolved specs during Gem::Specification.reset:
lumberjack (>= 1.0.2)
ffi (>= 0.5.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
What does this mean, and how do I fix it?
Contents of Guardfile:
guard 'livereload' do
watch(%r{.+\.(css|js|html)$})
end
guard 'sass', :input => 'css', :style => :compressed, :extension => '.min.css'
I was seeing this issue by just running RSpec on its own. From what I understand, this means that you have more than one version of the listed gems installed on your system, and RSpec is unsure which one to use. After uninstalling older version of the gems, the warnings went away.
You can try:
gem cleanup lumberjack
Or:
gem list lumberjack
gem uninstall lumberjack
If you're using Bundler, you can try bundle exec guard (or in my case bundle exec rspec).
Using the following command solved it for me:
bundle clean --force
See guard-and-unresolved-specs for more info
Use Bundler. Call bundle exec guard, not guard.
FYI:
gem cleanup
worked for me.
$ gem cleanup
Cleaning up installed gems...
Attempting to uninstall builder-3.2.2
Successfully uninstalled builder-3.2.2
Attempting to uninstall amatch-0.3.0
Successfully uninstalled amatch-0.3.0
Attempting to uninstall tins-1.12.0
Successfully uninstalled tins-1.12.0
Clean Up Complete
This worked for me:
bundle clean --force
then
bundle install
to reinstall gems.
I use gem list gem-name; gem uninstall gem-name to clean the gem one by one because of the dependency. After that, the error does not show again.
add
'bundle exec'
before your command.
I use ruby 2.4 and got the same problem when deploying jekyll on windows, it fixed.
I was getting this message while running Rspec within a Guard plugin gem, using bundle exec rspec. It turned out to be a missing line in the gemspec file:
$:.push File.expand_path("../lib", __FILE__)
This line is normally at the top of the file (in many of the gems I have recently been working in) and I had commented it out to see why.
Remember, if you want to use guard, you have to add gem guard to Gemfile.
group :developement, :test do
gem 'guard'
end
Then, run
bundle install
I hope this can help you.
If anyone has come this far and still hasn't found the answer I leave you with this. gem update --system. I tried all of these other answers to no avail. Hopefully this works for you.
Try gem uninstall <gem>
and it will remove all younger versions of gem.
You will then be asked
"If you remove this gem, these dependencies will not be met. Continue
deleting? [YN]"
Select the answer
"no"
to leave the latest version of gem and all dependencies remain valid.

Error installing gems that use native extensions on Ubuntu, Ruby 1.9.2 via RVM

I get an error while trying to install the ffi gem:
~ - 16:54>gem i ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/lib RUBYLIBDIR=/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/lib
/home/mdemare/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:370:in `bin_path': can't find gem rake ([">= 0"]) with executable rake (Gem::GemNotFoundException)
from /home/mdemare/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `<main>'
Gem files will remain installed in /home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6 for inspection.
Results logged to /home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/gen/gem_make.out
I'm getting frequent errors of all kinds while installing gems with native extensions, so I assume that there's something broken with my Ubuntu installation, but I've no idea what. I'll post any information you need to diagnose the problem.
EDIT: When I cd to the ffi gem (mentioned in the second but last line), and run the rake line in line 6, I get "Could not find RubyGem rake-compiler".
After gem i rake-compiler, and run rake again, I get this:
configure: error: source directory already configured; run "make distclean" there first
make: *** [/home/mdemare/.rvm/gems/ruby-1.9.2-p136/gems/ffi-1.0.6/build/x86_64-linux/ffi_c/1.9.2/libffi/.libs/libffi_convenience.a] Error 1
rake aborted!
Command failed with status (2): [make...]
Update:
These are my rake gemspecs:
~ - 10:59>find ~/.rvm/ -name 'rake-0.8.7.gemspec'
~/.rvm/gems/ruby-1.9.2-p136/specifications/rake-0.8.7.gemspec
~/.rvm/gems/ruby-1.9.2-p136#global/specifications/rake-0.8.7.gemspec
~/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/specifications/rake-0.8.7.gemspec
The last one is where gem looks, but that gemspec is different from the first one, and doesn't include the executable. Copying the long one doesn't quite solve the problem though - I get a file not found for the rake executable.
This caused me a ton of aggravation at the Boston Hack Day when trying to install Vagrant (for which FFI is a dependency). I ended up wasting so much time that I switched machines to work around the problem.
After the fact, I found a hack that works (although I'm sure there's a better solution). The file that the error message is complaining about
~/.rvm/gems/ruby-1.9.2-p180/bin/rake
differs from other similar copies in that it's missing path setup stuff at the head, so I copied these lines from one of the files that had them:
[genericized per #danv's answer below. Thanks for the improvement!]
ENV['GEM_HOME']=ENV['GEM_HOME'] || '~/.rvm/gems/ruby-1.9.2-p180'
ENV['GEM_PATH']=ENV['GEM_PATH'] || '~/.rvm/gems/ruby-1.9.2-p180:~/.rvm/gems/ruby-1.9.2-p180#global'
ENV['PATH']='~/.rvm/gems/ruby-1.9.2-p180/bin:~/.rvm/gems/ruby-1.9.2-p180#global/bin:~/.rvm/rubies/ruby-1.9.2-p180/bin:' + ENV['PATH']
That fixed it for me. This was a new Ubuntu 10.10 install with no default Ruby installation (which could be part of the problem) and Ruby 1.9.2 installed using RVM. Lots of other gems installed fine, including those requiring native compilation, so the problem is something specific to FFI.
I had a similar problem, and a workaround at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529663 helped me.
In short, try to install the gem with:
$ rake=/usr/bin/rake gem install ffi
#Tom Morris - Tried your method and it worked fine.
I inserted your path specs (modified - see below) into ~/.rvm/gems/ruby-1.9.2-p180/bin/rake after line 12.
I modified the path specs so they are generic using ~ for the user home:
ENV['GEM_HOME']=ENV['GEM_HOME'] || "~/.rvm/gems/ruby-1.9.2-p180"
ENV['GEM_PATH']=ENV['GEM_PATH'] || "~/.rvm/gems/ruby-1.9.2-p180:~/.rvm/gems/ruby-1.9.2-p180#global"
ENV['PATH']="~/.rvm/gems/ruby-1.9.2-p180/bin:~/.rvm/gems/ruby-1.9.2-p180#global/bin:~/.rvm/rubies/ruby-1.9.2-p180/bin:"+ ENV['PATH']
Thanks for finding this fix!
Thanks #Tim Morris and #danv, your answers / comments helped. I adjusted for my setup, which is based more towards a superuser environment. Now this is what /usr/local/rvm/gems/ruby-1.9.2-p180/bin/rake looks like on my server:
require 'rubygems'
version = ">= 0"
ENV['GEM_HOME']=ENV['GEM_HOME'] || "/usr/local/rvm/gems/ruby-1.9.2-p180"
ENV['GEM_PATH']=ENV['GEM_PATH'] || "/usr/local/rvm/gems/ruby-1.9.2-p180:/usr/local/rvm/gems/ruby-1.9.2-p180#global"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
gem 'rake', version
load Gem.bin_path('rake', 'rake', version)
The installer attempts to run rake but fails when it isn't found:
can't find gem rake ([">= 0"]) with executable rake (Gem::GemNotFoundException)
You need to install the rake gem: gem install rake.

rake aborted help

i don't really know what ruby,gems, or ror is, my objective is make this web application run in my local and after that push it on live. the problem is, when I perform this command
rake db:migrate
i am getting an error saying
rake aborted! Could not find RubyGem rack (~) 1.0.1)
what should I do ? please help me
It's telling you that you need a specific version of the Gem called "rack". You can install it by doing:
gem install rack -v=1.0.1
This will only install it to your local gem directory. If you want to install it globally (which is recommended for production environments), simply do:
sudo gem install rack -v=1.0.1
This will prompt you for the administrator password as usual.
You need to write this in your command prompt:
gem install rack

Resources