shasum check failed when installing rails #5699

Closed
prashdeep opened this Issue Jul 15, 2014 · 3 comments

4 participants

@prashdeep

I am getting the "shasum check failed" error while installing rails using "npm install rails" command. Below is the error details for more info:

Last login: Thu Jul 10 18:46:45 on ttys004
The use of this system means you consent to abide by the following Intuit policies and practices, including the Code of Conduct and Ethics, the Electronic Communications Policy and Information Security Policies.  These policies and practices apply to any individual using this system. This system is monitored by Intuit Inc.  Monitoring is conducted for various purposes, including compliance with Intuit policies, evidence of unauthorized access or misuse, and general maintenance.  In the course of such monitoring, some level of system use by authorized and unauthorized users may be recorded.  Individuals should be aware that any electronic communications sent through or stored on Intuit's equipment or the network should not be considered private. Intuit reserves the right to monitor, record, review or intercept all electronic communications sent through or stored on Intuit’s equipment or the network without prior notice.  Misuse or violation of Intuit policies while using Intuit systems may result in discipline, up to and including termination of employment.
BANL1191ec423:glass_ui pl1$ irb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
irb(main):001:0> ^C
irb(main):001:0> exit
BANL1191ec423:glass_ui pl1$ rails
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
BANL1191ec423:glass_ui pl1$ npm install -g rails
npm ERR! Error: shasum check failed for /var/folders/x3/9_cgs9hx5yz_h1bp3xhy815dmd59jz/T/npm-66137-Y7UADbKS/registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR! Expected: 9eb5552e380e7ad3aaacd1e453e80bdc2566adc4
npm ERR! Actual:   7c6781caa4c55e5ce1783c450b8d494c6093d5c0
npm ERR! From:     https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:929:16
npm ERR!     at process._tickCallback (node.js:419:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "rails"
npm ERR! cwd /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui/npm-debug.log
npm ERR! not ok code 0
BANL1191ec423:glass_ui pl1$ npm install rails
npm ERR! Error: shasum check failed for /var/folders/x3/9_cgs9hx5yz_h1bp3xhy815dmd59jz/T/npm-66449-8QC6qJwe/registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR! Expected: 9eb5552e380e7ad3aaacd1e453e80bdc2566adc4
npm ERR! Actual:   7c6781caa4c55e5ce1783c450b8d494c6093d5c0
npm ERR! From:     https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:929:16
npm ERR!     at process._tickCallback (node.js:419:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "rails"
npm ERR! cwd /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui/npm-debug.log
npm ERR! not ok code 0
BANL1191ec423:glass_ui pl1$ sudo gem install

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
ERROR:  While executing gem ... (Gem::CommandLineError)
    Please specify at least one gem name (e.g. gem build GEMNAME)
BANL1191ec423:glass_ui pl1$ sudo gem install rails
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777




Fetching: i18n-0.6.11.gem (100%)
Successfully installed i18n-0.6.11
Fetching: thread_safe-0.3.4.gem (100%)
Successfully installed thread_safe-0.3.4
Fetching: tzinfo-1.2.1.gem (100%)
Successfully installed tzinfo-1.2.1
Fetching: minitest-5.4.0.gem (100%)
Successfully installed minitest-5.4.0
Fetching: activesupport-4.1.4.gem (100%)
Successfully installed activesupport-4.1.4
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2
Fetching: rack-test-0.6.2.gem (100%)
Successfully installed rack-test-0.6.2
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: actionview-4.1.4.gem (100%)
Successfully installed actionview-4.1.4
Fetching: actionpack-4.1.4.gem (100%)
Successfully installed actionpack-4.1.4
Fetching: activemodel-4.1.4.gem (100%)
Successfully installed activemodel-4.1.4
Fetching: arel-5.0.1.20140414130214.gem (100%)
Successfully installed arel-5.0.1.20140414130214
Fetching: activerecord-4.1.4.gem (100%)
Successfully installed activerecord-4.1.4
Fetching: mime-types-1.25.1.gem (100%)
Successfully installed mime-types-1.25.1
Fetching: polyglot-0.3.5.gem (100%)
Successfully installed polyglot-0.3.5
Fetching: treetop-1.4.15.gem (100%)
Successfully installed treetop-1.4.15
Fetching: mail-2.5.4.gem (100%)
Successfully installed mail-2.5.4
Fetching: actionmailer-4.1.4.gem (100%)
Successfully installed actionmailer-4.1.4
Fetching: thor-0.19.1.gem (100%)
Successfully installed thor-0.19.1
Fetching: railties-4.1.4.gem (100%)
railties's executable "rails" conflicts with /usr/bin/rails
Overwrite the executable? [yN]  ERROR:  Error installing rails:
    "rails" from railties conflicts with /usr/bin/rails
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ RAILS
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ /usr/bin/rails 
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ ./usr/bin/rails
-bash: ./usr/bin/rails: No such file or directory
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ . /usr/bin/rails 
-bash: require: command not found
-bash: version: command not found
-bash: /usr/bin/rails: line 6: syntax error near unexpected token `('
-bash: /usr/bin/rails: line 6: `if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then'
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ rvm
-bash: rvm: command not found
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ clear

BANL1191ec423:glass_ui pl1$ sudo gem install rails
Password:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
^CERROR:  Interrupted
BANL1191ec423:glass_ui pl1$ npm install rails
npm ERR! Error: shasum check failed for /var/folders/x3/9_cgs9hx5yz_h1bp3xhy815dmd59jz/T/npm-72187-f8ExkHbM/registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR! Expected: 9eb5552e380e7ad3aaacd1e453e80bdc2566adc4
npm ERR! Actual:   7c6781caa4c55e5ce1783c450b8d494c6093d5c0
npm ERR! From:     https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:929:16
npm ERR!     at process._tickCallback (node.js:419:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "rails"
npm ERR! cwd /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui/npm-debug.log
npm ERR! not ok code 0
BANL1191ec423:glass_ui pl1$ rvm
-bash: rvm: command not found
BANL1191ec423:glass_ui pl1$ sudo gem install rails
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777




railties's executable "rails" conflicts with /usr/bin/rails
Overwrite the executable? [yN]  ERROR:  Error installing rails:
    "rails" from railties conflicts with /usr/bin/rails
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ 
BANL1191ec423:glass_ui pl1$ clear






BANL1191ec423:glass_ui pl1$ npm install rails
npm ERR! Error: shasum check failed for /var/folders/x3/9_cgs9hx5yz_h1bp3xhy815dmd59jz/T/npm-74947-HNg51YJr/registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR! Expected: 9eb5552e380e7ad3aaacd1e453e80bdc2566adc4
npm ERR! Actual:   7c6781caa4c55e5ce1783c450b8d494c6093d5c0
npm ERR! From:     https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:929:16
npm ERR!     at process._tickCallback (node.js:419:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "rails"
npm ERR! cwd /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/pl1/ui_projects/glass_ui_v0.1/glass_ui/npm-debug.log
npm ERR! not ok code 0
BANL1191ec423:glass_ui pl1$ cd ~/

BANL1191ec423:~ pl1$ npm install rails


0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'rails' ]
2 info using npm@1.4.14
3 info using node@v0.10.29
4 verbose cache add [ 'rails', null ]
5 verbose cache add name=undefined spec="rails" args=["rails",null]
6 verbose parsed url { protocol: null,
6 verbose parsed url   slashes: null,
6 verbose parsed url   auth: null,
6 verbose parsed url   host: null,
6 verbose parsed url   port: null,
6 verbose parsed url   hostname: null,
6 verbose parsed url   hash: null,
6 verbose parsed url   search: null,
6 verbose parsed url   query: null,
6 verbose parsed url   pathname: 'rails',
6 verbose parsed url   path: 'rails',
6 verbose parsed url   href: 'rails' }
7 silly lockFile 79fdb82a-rails rails
8 verbose lock rails /Users/pl1/.npm/79fdb82a-rails.lock
9 silly lockFile 79fdb82a-rails rails
10 silly lockFile 79fdb82a-rails rails
11 verbose addNamed [ 'rails', '' ]
12 verbose addNamed [ null, '*' ]
13 silly lockFile 39038075-rails rails@
14 verbose lock rails@ /Users/pl1/.npm/39038075-rails.lock
15 silly addNameRange { name: 'rails', range: '*', hasData: false }
16 verbose url raw rails
17 verbose url resolving [ 'https://registry.npmjs.org/', './rails' ]
18 verbose url resolved https://registry.npmjs.org/rails
19 info trying registry request attempt 1 at 10:08:28
20 http GET https://registry.npmjs.org/rails
21 http 200 https://registry.npmjs.org/rails
22 silly registry.get cb [ 200,
22 silly registry.get   { date: 'Tue, 15 Jul 2014 04:37:55 GMT',
22 silly registry.get     server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
22 silly registry.get     etag: '"1A3IIQBEAXJQF621ODKHXRYJN"',
22 silly registry.get     'content-type': 'application/json',
22 silly registry.get     'cache-control': 'max-age=30',
22 silly registry.get     'content-length': '10423',
22 silly registry.get     'accept-ranges': 'bytes',
22 silly registry.get     via: '1.1 varnish',
22 silly registry.get     age: '1685',
22 silly registry.get     'x-served-by': 'cache-fra1232-FRA',
22 silly registry.get     'x-cache': 'HIT',
22 silly registry.get     'x-cache-hits': '1',
22 silly registry.get     'x-timer': 'S1405399075.089278,VS0,VE172',
22 silly registry.get     vary: 'Accept',
22 silly registry.get     'keep-alive': 'timeout=10, max=50',
22 silly registry.get     connection: 'Keep-Alive' } ]
23 silly addNameRange number 2 { name: 'rails', range: '*', hasData: true }
24 silly addNameRange versions [ 'rails', [ '4.1.0-beta' ] ]
25 verbose addNamed [ 'rails', '4.1.0-beta' ]
26 verbose addNamed [ '4.1.0-beta', '4.1.0-beta' ]
27 silly lockFile cad553ee-rails-4-1-0-beta rails@4.1.0-beta
28 verbose lock rails@4.1.0-beta /Users/pl1/.npm/cad553ee-rails-4-1-0-beta.lock
29 silly lockFile 2f8e42f3-s-org-rails-rails-4-1-0-beta-tgz https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
30 verbose lock https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz /Users/pl1/.npm/2f8e42f3-s-org-rails-rails-4-1-0-beta-tgz.lock
31 verbose addRemoteTarball [ 'https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz',
31 verbose addRemoteTarball   '9eb5552e380e7ad3aaacd1e453e80bdc2566adc4' ]
32 info retry fetch attempt 1 at 10:08:29
33 verbose fetch to= /var/folders/x3/9_cgs9hx5yz_h1bp3xhy815dmd59jz/T/npm-76637-XdajOED0/registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
34 http GET https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
35 http 200 https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
36 silly lockFile 2f8e42f3-s-org-rails-rails-4-1-0-beta-tgz https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
37 silly lockFile 2f8e42f3-s-org-rails-rails-4-1-0-beta-tgz https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
38 silly lockFile cad553ee-rails-4-1-0-beta rails@4.1.0-beta
39 silly lockFile cad553ee-rails-4-1-0-beta rails@4.1.0-beta
40 silly lockFile 39038075-rails rails@
41 silly lockFile 39038075-rails rails@
42 error Error: shasum check failed for /var/folders/x3/9_cgs9hx5yz_h1bp3xhy815dmd59jz/T/npm-76637-XdajOED0/registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
42 error Expected: 9eb5552e380e7ad3aaacd1e453e80bdc2566adc4
42 error Actual:   7c6781caa4c55e5ce1783c450b8d494c6093d5c0
42 error From:     https://registry.npmjs.org/rails/-/rails-4.1.0-beta.tgz
42 error     at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
42 error     at ReadStream.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
42 error     at ReadStream.emit (events.js:117:20)
42 error     at _stream_readable.js:929:16
42 error     at process._tickCallback (node.js:419:13)
43 error If you need help, you may report this *entire* log,
43 error including the npm and node versions, at:
43 error     <http://github.com/npm/npm/issues>
44 error System Darwin 13.3.0
45 error command "node" "/usr/local/bin/npm" "install" "rails"
46 error cwd /Users/pl1
47 error node -v v0.10.29
48 error npm -v 1.4.14
49 verbose exit [ 1, true ]
@othiym23

I have a question and a comment.

Question: why are you installing Rails using npm? There's an old beta of Rails published on npm (perhaps @tbranyen can shed some light onto why he put it there in the first place), but Rails is a Ruby app, not a Node one. I think it's best to consider this an experimental way to install Rails. You'll probably have better luck with sudo gem install rails for now.

Comment: it's likely that this version of Rails was published using a version of npm run with Node 0.11.x, which has some known issues with shasums. @tbranyen should probably republish it using a version of Node that doesn't have this problem.

@tjwebb

I had this issue with one of my modules: #5588

@othiym23

Closing as abandoned, although I am still amused, saddened, and bemused by the existence of Rails on npm.

@othiym23 othiym23 closed this Sep 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment