Aktywowałeś już rake 0.9.0, ale twój Gemfile wymaga rake 0.8.7

[3]} próbuję uruchomić rails project, I get

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Jeśli zrobię: "bundle install"

Ale I ' m getting

You have already activated rake 0.9.0, but your Gemfile requires rake 0.8.7

Podczas wykonywania

rake db:migrate
Author: Mujah Maskey, 2011-05-21

9 answers

Najpierw sprawdź, czy rake jest wymieniony w Twoim Gemfile. Jeśli nie, dodaj ją i określ wersję "już aktywowałeś".

Następnie musisz powiedzieć bundle, aby zaktualizował wersję rake używaną dla Twojej aplikacji:

bundle update rake
To zaktualizuje twoje Gemfile.lock dla Ciebie.
 235
Author: danneu,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-07-12 21:24:55

Gdzie aktualnie używasz komend rake, takich jak

rake db:migrate

Użyj tego zamiast:

bundle exec rake db:migrate

Tak będzie, dopóki najnowsza wersja rails i / lub rake nie będą ze sobą dobrze współpracować.

 39
Author: Floyd Price,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2016-01-29 20:49:52

Dziękuję dobremu Denowi, pozdrawiam gościu. ale trochę więcej musiałem zrobić. oto rozwiązanie (działa dla mnie). Dodałem

gem 'rake','0.8.7'

Na Gemfile, którego tam nie było, ale moja nowa wersja rails automatycznie instaluje rake(0.9.0).

Po tym jak usunąłem rake0. 9. 0 przez gem uninstall rake a po wykonaniu bundle update rake mogę tworzyć i migrować bazę danych.

 21
Author: Mujah Maskey,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-25 04:03:31

Rake 0.9.0 łamie szyny.

Zobacz tutaj: Rake 0.9.0 'undefined method 'Zadanie' '

Użyj bundle exec rake zamiast rake, aby uruchomić rake w poprawnej wersji.

 8
Author: sj26,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-05-23 12:10:36

Określ wersję, którą chcesz umieścić w pliku Gemfile.

gem 'rake', '0.9.0' 

Then

bundle update rake

Musisz użyć bundle exec, aby uruchomić zadanie rake

bundle exec rake db:migrate
 7
Author: hacksignal,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-01-17 21:33:52

Spójrz, to przyszłość. Dla mnie to było narzekanie, że mam rake 10.x Zainstalowany, gdy chciał 0.9.5. Nie jestem do końca pewien, nie znam Rubiego na tyle, żeby naprawdę zagłębić się w to, co stało się z najnowszymi numerami wersji, ale to, co zrobiłem, to:

gem uninstall rake
gem install rake -v 0.9.5

Aby zmusić system do zainstalowania wersji rake, którą chciała aplikacja (dla mnie był to Octopress).

 6
Author: subdigit,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-12-04 05:02:18

Miałem ten problem (z innym klejnotem, który nie był grabie) i udało mi się go naprawić przez

gem uninstall <complaining gem>
gem install <complaining gem>

bundle install
bundle update

Zauważ, że słowo kluczowe "sudo" nie zostało użyte (np. sudo bundle install), ponieważ może to umieścić Twój gem w katalogach, w których Twoja aplikacja rails może nie wyszukiwać.

 5
Author: glacier,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-03-24 21:25:09

Jeśli rozumiem, o co nie prosisz, musisz otworzyć plik Gemfile I zmienić linię...

gem 'rake', '0.8.7'

...do ...

gem 'rake', '0.9.0'
 3
Author: Olivier L.,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-21 06:34:37

Dodaj to do swojego Gemfile

# Rake 0.9.0 break Rails.
gem "rake", "!= 0.9.0"

A następnie Odinstaluj rake-0.9.0

 3
Author: karlballard,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-25 11:50:19