Error while doing rake db:setup in Grape APi sample code - ruby

Here is the error on typing rake db:setup
git://github.com/leftbee/em-postgresql-adapter.git (at master) is not checked out. Please run `bundle install`
So i tried to run bundle install but after that still getting this error.
I'm following this getting started post
https://github.com/djones/grape-goliath-example

Try bundle exec rake db:setup instead.

Related

Ruby on rails rake db error

I have cloned a project and ran it locally on my machine. I'm getting an error when i run rake db:migrate.
Can anyone please explain this to me? I have attached an image showing the error I am receiving.
Error Received
You need to update your rails gem, from 3.2.19 to 3.2.22.
You can edit your gemfile to look like this:
gem 'rails', '3.2.22'
and then run
bundle update rails
Try following command:
rake db:scheme:load

Heroku: where did my gems go?

I have been deploying a Rails 3.2 application to heroku for several weeks now. I have also been executing rake tasks on the Cedar stack where my application is located.
One day after a deploy I noticed that rake was no longer working. I get, for example, the following:
$:~/dev/my_project$ heroku run rake -T
Running `rake -T` attached to terminal... up, run.7566
bundler: command not found: rake
Install missing gem executables with `bundle install`
Trying to run commands with bundle exec yields the same results.
What I've tried:
heroku run bundle install. This works and informs me that gems were installed into ./vendor/bundle. However, heroku run ls ./vendor/bundle yields only the following:
$:~/dev/my_project$ heroku run ls ./vendor/bundle/
Runningls ./vendor/bundle/attached to terminal... up, run.3458
bin ruby
bundle package. Although the deployment works it does not help my problem.
fiddling around with the rubygems-bundler gem (although I think this is now part of core bundler). This does not seem to have any effect.
On Heroku, gems are installed within the vendor/bundle/ruby/<version>/gems directory. I just checked my Heroku instance and confirmed this.
You are going to want to use bundle exec rake task because the gems are not in the users PATH.

Getting error that rake is missing despite the fact that it's there

$ sudo ./msfconsole
Could not find rake-10.1.0 in any of the sources
Run `bundle install` to install missing gems.
$ rake --version
rake, version 10.1.0
Does anyone know what could cause this?
I tried running bundle install, but when I try to run msfconsole again afterwards it throws the error again.
It might be a PATH-related issue.
Try it with sudo -E, so that your PATH, gem locations, etc. all become available when running sudo.
Other possibilities might be detailed in these related questions:
Could not find rake with bundle exec
bundle exec fails with "could not find rake-10.1.0 in any of the sources"
Could not find rake-10.1.0 in any of the sources

Rake aborted ! Issue installing Octopress

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

Rails 3 migration error

I am new to Ruby and Rails, and whenever I attempt to generate my database using rake db:migrate I get the following error:
rake aborted!
You have already activated rake 0.9.3.beta.1, but your Gemfile requires rake 0.9.2. Consider using bundle exec.
I am using Ruby 1.9.2 and Rails 3.
Consider using bundle exec.
There's your clue. Try this instead:
bundle exec rake db:migrate

Resources