Ruby on Rails
Monday, January 12, 2015
Hi guys, I have the same problems:
I can't figure out why I have the following error when trying to run `rails s` on a Windows 7 x64 box:
```
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/jst_processor.rb:5:in `<class:JstProcess
or>': undefined method `default_mime_type=' for Sprockets::JstProcessor:Class (NoMethodError)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/jst_processor.rb:4:in `<mod
ule:Sprockets>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/jst_processor.rb:3:in `<top
(required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/engines.rb:3:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/engines.rb:3:in `<top (requ
ired)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets.rb:44:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets.rb:44:in `<module:Sprockets
>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets.rb:3:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.2/lib/sprockets/railtie.rb:5:in `requi
re'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.2/lib/sprockets/railtie.rb:5:in `<top
(required)>'
from c:/Users/ZFTC0418/Documents/projects/rails_draft/config/application.rb:10:in `require'
from c:/Users/ZFTC0418/Documents/projects/rails_draft/config/application.rb:10:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in
`require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in
`block in server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in
`tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in
`server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in
`run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required
)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
```
Reproduced with the following configuration:
- OS: Windows 7 x 64bits
- Ruby `ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]`
- sprockets version 2.12.3
The Gemfile has the line with therubyracer gem commented:
```
#gem 'therubyracer', platforms: :ruby
```
I have node.js installed:
```
node -v
v0.10.35
```
and node gem too:
```
node (0.0.2)
```
Any idea on how to fix that ? Thank you.
On Friday, March 14, 2014 at 11:17:19 AM UTC+1, Peter Heylin wrote:
-- I can't figure out why I have the following error when trying to run `rails s` on a Windows 7 x64 box:
```
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/jst_processor.rb:5:in `<class:JstProcess
or>': undefined method `default_mime_type=' for Sprockets::JstProcessor:Class (NoMethodError)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/jst_processor.rb:4:in `<mod
ule:Sprockets>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/jst_processor.rb:3:in `<top
(required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/engines.rb:3:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets/engines.rb:3:in `<top (requ
ired)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets.rb:44:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets.rb:44:in `<module:Sprockets
>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-2.12.3/lib/sprockets.rb:3:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.2/lib/sprockets/railtie.rb:5:in `requi
re'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.2.2/lib/sprockets/railtie.rb:5:in `<top
(required)>'
from c:/Users/ZFTC0418/Documents/projects/rails_draft/config/application.rb:10:in `require'
from c:/Users/ZFTC0418/Documents/projects/rails_draft/config/application.rb:10:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in
`require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in
`block in server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in
`tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in
`server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in
`run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required
)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
```
Reproduced with the following configuration:
- OS: Windows 7 x 64bits
- Ruby `ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]`
- sprockets version 2.12.3
The Gemfile has the line with therubyracer gem commented:
```
#gem 'therubyracer', platforms: :ruby
```
I have node.js installed:
```
node -v
v0.10.35
```
and node gem too:
```
node (0.0.2)
```
Any idea on how to fix that ? Thank you.
On Friday, March 14, 2014 at 11:17:19 AM UTC+1, Peter Heylin wrote:
Hi,I got it sorted. Here is what I did to fix it:I found a commit in the Sprockets Github repo (https://github.com/sstephenson/sprockets/commit/ ) when searching for a fix for the undefined method error relating to default_mime_type. I then applied this change to the following ruby scripts in the sprockets 2.11.0 gem directory: jst_processor, sass_compressor, closure_compressor, uglifier_compressor, sass_template, scss_template.743c1b1a6433195e440e2d863e5d47 67cc41271a I then edited my GemFile to activate therubyracer within my gem environment.Thanks for your assistance.Peter
On Thursday, March 13, 2014 10:17:04 AM UTC, Peter Heylin wrote:Hi,My apologies if a similar topic exists already. I did search, but could not find anything related to below.I am new to Ruby on Rails. I am currently setting up a Ruby on Rails environment on a CentOS 6.4 64-bit server.When I attempt to start the rails server, I get the following:/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.3/ lib/active_support/key_ generator.rb:2:in `require': cannot load such file -- openssl (LoadError) from /usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.0.3/ lib/active_support/key_ generator.rb:2:in `<top (required)>' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/application.rb:3:in `require' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/application.rb:3:in `<top (required)>' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails.rb:9:in `require' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails.rb:9:in `<top (required)>' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/all.rb:1:in `require' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/all.rb:1:in `<top (required)>' from /root/Documents/ruby/rubyonrails/blog/config/ application.rb:3:in `require' from /root/Documents/ruby/rubyonrails/blog/config/ application.rb:3:in `<top (required)>' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/commands.rb:74:in `require' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/commands.rb:74:in `block in <top (required)>' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/commands.rb:71:in `tap' from /usr/local/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/ rails/commands.rb:71:in `<top (required)>' from bin/rails:4:in `require'from bin/rails:4:in `<main>'Would anyone have any advice or suggestions that might help to steer me in the right direction with regard to resolving the above error.Thanks in advance,Peter
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/70fa0423-8d18-4224-9048-734894dea2a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment