j:\work\code_campo>rails server
[WARNING] Please install gem 'therubyracer' to use Less.
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:2:in
 
`require': cannot load such file -- v8 (LoadError)
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script/v8_context.rb:2:in
 
`<top (required)>'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script.rb:9:in 
`require'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script.rb:9:in 
`default_context_wrapper'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/java_script.rb:17:in 
`context_wrapper'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less/loader.rb:10:in 
`initialize'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:14:in `new'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:14:in 
`<module:Less>'
        from 
J:/ruby/ruby/lib/ruby/gems/1.9.1/gems/less-2.2.1/lib/less.rb:9:in `<top 
(required)>'


在 2012年6月24日星期日UTC+8上午8时27分36秒,Andrew Meyer写道:
>
> The problem is that less doesn't officially depend on therubyracer. It 
> installs just fine, but when you try to run 'rails server' afterwards it 
> crashes, claiming that you need to install therubyracer. (It does do this 
> on less 2.2.1)
>
> On Thursday, June 21, 2012 6:37:34 PM UTC-5, Luis Lavena wrote:
>>
>> On Thursday, June 21, 2012 1:16:05 PM UTC-3, Ruby-Forum.com User wrote:
>>>
>>>
>>> Hi Luis, 
>>> Thanks for the answer.  I did run bundle install and bundle update a few 
>>> times after I changed the gemfile without any luck.  I wonder why less 
>>> is depending on therubyracer?  Any ideas?  
>>
>>
>> I have no idea of the contents of your Gemfile or Gemfile.lock to 
>> determine that.
>>
>> The only hint I have is that less 2.1.0 might be the gem that depends on 
>> that:
>>
>> http://rubygems.org/gems/less/versions/2.1.0
>>
>> Upgrading to latest less might solve the issue (latest less is 2.2.1)
>>  
>>
>>> I read on different threads 
>>> that Win7 has Java Runtime Development included and that is why 
>>> therubyracer should not be required.  Any clarification on this topic 
>>> would be hugely appreciated!  I am completely stuck right now.  Thanks!! 
>>>
>>>
>> You mean JavaScript runtime? Yes, Windows have a built-in JavaScript 
>> runtime accessible through "cscript" executable.
>>
>> ExecJS, the gem that uses the JavaScript engine will detect it and use it.
>>
>> Under some circumstances (messed up Windows installation or uninstalled 
>> components due customized versions of Windows) it might not work and ExecJS 
>> will trigger an exception saying there is no JavaScript runtime engine and 
>> you should install one.
>>
>> If that is the case, install NodeJS and restart your computer, that 
>> should solve the issue.
>>
>> So, to summarize:
>>
>> 1) Remove therubyracer from your Gemfile
>> 2) Update less to a version that doesn't depend on therubyracer (2.2.1 
>> doesn't)
>> 3) Do "bundle update less" so the Gemfile.lock gets updated
>> 4) Start your app (ruby script\rails server)
>> 5) If ExecJS fails, install NodeJS and try step 4 again.
>>
>> --
>> Luis Lavena
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/ISvd3Ea_J7oJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Reply via email to