SpringAll
SpringAll copied to clipboard
62.Spring-Boot-Shiro-JWT
executeLogin 这个方法,执行失败捕获的异常直接是 return false 会再次执行登录,是不是应该直接 throw 抛出异常?
I had problems with this until I was root user. Are you running this command as admin (assuming similar privileges on win7)
I am running this under escalated privileges - selected "run as administrator" in both the windows console and the packaged ruby installer console. Problem remains.
What do you mean by "attempts"?
I had this issue and deleted Gemfile.lock, ran bundle install again.
There are a lot of windoze probs though..
Some problems occur in Windows due to bundler not taking into account Windows line-endings. Open C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/lockfile_parser.rb and change line 14 to read:
lockfile.split(/\r?\n+/).each do |line|
(i.e. add a \r?). Let me know if this resolves the problem! Cheers.
Okay follow up - it looks like windows may not have a valid reference point for git in the native windows shell - but it proceeds a little further into the bundler script using TomNZ's suggestion.
Here is the error output information:
E:\web\diaspora>bundle install Fetching source index for http://rubygems.org/ Fetching git://github.com/rsofaer/carrierwave.git C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:551:in ``' : No such file or directory - git clone "git://github.com/rsofaer/carrierwave.gi t" "E:/web/diaspora/vendor/bundle/ruby/1.8/cache/bundler/git/carrierwave-2ede862 d9facc3d7e1aa45227a4a08a35ae529f2" --bare --no-hardlinks (Errno::ENOENT) from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source. rb:551:in `git' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source. rb:608:in `cache' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source. rb:523:in `specs' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/lazy_sp ecification.rb:48:in `__materialize__' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_se t.rb:83:in `materialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_se t.rb:81:in `map!' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_se t.rb:81:in `materialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/definit ion.rb:93:in `specs' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/definit ion.rb:88:in `resolve_remotely!' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/install er.rb:35:in `run' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/install er.rb:8:in `install' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/cli.rb: 217:in `install' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/task.rb:22:in `send' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/task.rb:22:in `run' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/invocation.rb:118:in `invoke_task' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor.rb:246:in `dispatch' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/base.rb:389:in `start' from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/bin/bundle:13 from C:/Ruby187/bin/bundle:19:in `load' from C:/Ruby187/bin/bundle:19
Attempting to install from the MINGW32 shell included with msysgit also fails on the make command as follows:
/e/web/diaspora (dev-rich) $ bundle install Fetching source index for http://rubygems.org/ Fetching git://github.com/rsofaer/carrierwave.git remote: Counting objects: 4189, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 4189 (delta 2652), reused 4179 (delta 2647) Receiving objects: 100% (4189/4189), 740.77 KiB | 265 KiB/s, done. Resolving deltas: 100% (2652/2652), done. Fetching http://github.com/BadMinus/devise.git remote: Counting objects: 7490, done. remote: Compressing objects: 100% (2457/2457), done. remote: Total 7490 (delta 4732), reused 7427 (delta 4702) Receiving objects: 100% (7490/7490), 917.20 KiB | 232 KiB/s, done. Resolving deltas: 100% (4732/4732), done. Fetching git://github.com/igrigorik/em-http-request.git remote: Counting objects: 1436, done. remote: Compressing objects: 100% (624/624), done. remote: Total 1436 (delta 928), reused 1252 (delta 787)Receiving objects: 98% ( Receiving objects: 100% (1436/1436), 206.45 KiB | 148 KiB/s, done. Resolving deltas: 100% (928/928), done. Fetching http://github.com/jnunemaker/validatable.git remote: Counting objects: 1216, done. remote: Compressing objects: 100% (430/430), done. remote: Total 1216 (delta 873), reused 1035 (delta 773)Receiving objects: 94% ( Receiving objects: 100% (1216/1216), 171.99 KiB | 128 KiB/s, done. Resolving deltas: 100% (873/873), done. Fetching http://github.com/jnunemaker/mongomapper.git remote: Counting objects: 7323, done. remote: Compressing objects: 100% (2659/2659), done. remote: Total 7323 (delta 5198), reused 6546 (delta 4563) Receiving objects: 100% (7323/7323), 880.88 KiB | 402 KiB/s, done. Resolving deltas: 100% (5198/5198), done. Fetching git://github.com/rsofaer/redfinger.git remote: Counting objects: 137, done. remote: Compressing objects: 100% (74/74), done. remote: Total 137 (delta 58), reused 118 (delta 51)Receiving objects: 27% (37/1 Receiving objects: 29% (40/137) Receiving objects: 100% (137/137), 18.36 KiB, done. Resolving deltas: 100% (58/58), done. Fetching git://github.com/Empact/roxml.git remote: Counting objects: 4282, done. remote: Compressing objects: 100% (1801/1801), done. remote: Total 4282 (delta 2696), reused 3764 (delta 2376) Receiving objects: 100% (4282/4282), 532.00 KiB | 314 KiB/s, done. Resolving deltas: 100% (2696/2696), done. Fetching git://github.com/rsofaer/sprinkle.git remote: Counting objects: 2106, done. remote: Compressing objects: 100% (711/711), done. remote: Total 2106 (delta 1354), reused 2086 (delta 1344) Receiving objects: 100% (2106/2106), 265.94 KiB | 241 KiB/s, done. Resolving deltas: 100% (1354/1354), done. Installing rake (0.8.7) Installing abstract (1.0.0) Installing activesupport (3.0.0) Installing builder (2.1.2) Installing i18n (0.4.1) Installing activemodel (3.0.0) Installing erubis (2.6.6) Installing rack (1.2.1) Installing rack-mount (0.6.13) Installing rack-test (0.5.4) Installing tzinfo (0.3.23) Installing actionpack (3.0.0) Installing mime-types (1.16) Installing polyglot (0.3.1) Installing treetop (1.4.8) Installing mail (2.2.5) Installing actionmailer (3.0.0) Installing arel (1.0.1) Installing activerecord (3.0.0) Installing activeresource (3.0.0) Installing addressable (2.2.0) Installing autotest (4.3.2) Installing bcrypt-ruby (2.1.2) with native extensions c:/Ruby187/lib/ruby/site_r uby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) c:/Ruby187/bin/ruby.exe extconf.rb creating Makefile make 'make' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in e:/web/diaspora/vendor/bundle/ruby/1.8/gems/b crypt-ruby-2.1.2 for inspection. Results logged to e:/web/diaspora/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.2/ ext/mri/gem_make.out from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `eac h' from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `bui ld_extensions' from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `ins tall' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source. rb:100:in `install' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/install er.rb:55:in `run' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_se t.rb:12:in `each' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_se t.rb:12:in `each' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/install er.rb:44:in `run' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/install er.rb:8:in `install' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/cli.rb: 217:in `install' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/task.rb:22:in `send' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/task.rb:22:in `run' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/invocation.rb:118:in `invoke_task' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor.rb:246:in `dispatch' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/ thor/base.rb:389:in `start' from c:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.0.0/bin/bundle:13 from c:/Ruby187/bin/bundle:19:in `load' from c:/Ruby187/bin/bundle:19
deleting the lockfile (gemfile.lock) causes the bundle install script to fail in the following way:
$ bundle install You have modified your Gemfile in development but did not check the resulting snapshot (Gemfile.lock) into version control You have added to the Gemfile: * source: git://github.com/rsofaer/sprinkle.git (at master) * source: git://github.com/rsofaer/carrierwave.git (at master) * source: git://github.com/igrigorik/em-http-request.git (at master) * source: git://github.com/rsofaer/redfinger.git (at master) * source: git://github.com/Empact/roxml.git (at master) * source: http://github.com/jnunemaker/validatable.git (at master) * source: http://github.com/jnunemaker/mongomapper.git (at master) * source: http://github.com/BadMinus/devise.git (at master) * source: rubygems repository http://rubygems.org/ * rails (= 3.0.0) * bundler (= 1.0.0) * devise * mongo_mapper (= 0.8.4) * jnunemaker-validatable (= 1.8.4) * bson_ext (= 1.0.7) * bson (= 1.0.7) * haml * will_paginate (= 3.0.pre2) * roxml * addressable * json * pubsubhubbub * redfinger * em-http-request * em-websocket * thin * carrierwave * mini_magick * rspec (>= 2.0.0.beta.17) * rspec-rails (= 2.0.0.beta.17) * mocha * webrat (= 0.7.2.beta.1) * redgreen * autotest * factory_girl_rails * database_cleaner * saucelabs-adapter (= 0.8.12) * selenium-rc * webmock * nifty-generators * ruby-debug * sprinkle You have changed in the Gemfile: * mongo_mapper from `http://github.com/jnunemaker/mongomapper.git (at master)` t o `no specified source` * sprinkle from `git://github.com/rsofaer/sprinkle.git (at master)` to `no speci fied source` * jnunemaker-validatable from `http://github.com/jnunemaker/validatable.git (at master)` to `no specified source` * carrierwave from `git://github.com/rsofaer/carrierwave.git (at master)` to `no specified source` * em-http-request from `git://github.com/igrigorik/em-http-request.git (at maste r)` to `no specified source` * roxml from `git://github.com/Empact/roxml.git (at master)` to `no specified so urce` * devise from `http://github.com/BadMinus/devise.git (at master)` to `no specifi ed source` * redfinger from `git://github.com/rsofaer/redfinger.git (at master)` to `no spe cified source`
I don't mean to be too aggressive about this, but the core team is pretty much never going to be helping people with windows problems. You should pretty much use a VM. I know there are windows guides out there, if you're still having configuration problems ask on diaspora.shapado.com, or in #diaspora
That's too bad and extremely shortsighted. Some people just don't have to option to run a vm - performance on windoze is bad enough.
So far the various workarounds are working ok, but it wouldn't hurt to have a little pressure sent back upstream to fix some of the windoze problems.
Sorry, I don't mean that we're going to ignore it. If we get patches that solve windows problems, we'll pull them in, but we don't even have windows machines to test on.
No problem with that, I understand the priorities involved and the "peculiarities" of the platform.
Should I leave this issue open for the time being? I'm perfectly willing to help you test this project on a Windows platform if you need. Definitely can't hurt the project's adoption rate if people can install a diaspora seed pain free on native Windows.
Closed is ok, I can get a seed running locally without too much trouble. Perhaps we can revisit Windows compatibility in the future once the Diaspora code evolves a bit and Ruby 1.9.2 is used
I'd definitely appreciate it if you put any windows tips on a wiki page, and we can open a new issue once we close the 1.9.2 issue, which should be soon. I think the nature of installation guides might be better suited to the wiki anyway.