ruby-on-railsrubygemstwitter-bootstrap-rails

cannot load such file -- v8 (in E:/work/store/app/assets/stylesheets/bootstrap_and_overrides.css.less)


1)rails new store

2)rails g scaffold product name price:decimal --skip-stylesheets

3)rake db:migrate

4)in Gemfile : gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'

5)bundle install

6)rails generate bootstrap:install less

7)browser :

enter image description here

after the restart, the error is repeated. Why? I enjoyed instructions: https://github.com/seyhunak/twitter-bootstrap-rails

app/assets/stylesheets/application.css

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any styles
 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
 * file per style scope.
 *
 *= require_tree .
 *= require_self
 */

app/assets/stylesheets/bootstrap_and_overrides.css.less

@import "twitter/bootstrap/bootstrap";

// Set correct font paths
@glyphiconsEotPath: font-url("glyphicons-halflings-regular.eot");
@glyphiconsEotPath_iefix: font-url("glyphicons-halflings-regular.eot?#iefix");
@glyphiconsWoffPath: font-url("glyphicons-halflings-regular.woff");
@glyphiconsTtfPath: font-url("glyphicons-halflings-regular.ttf");
@glyphiconsSvgPath: font-url("glyphicons-halflings-regular.svg#glyphicons_halflingsregular");

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
@fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
@fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
@fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
@fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
@fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");

// Font Awesome
@import "fontawesome/font-awesome";

// Glyphicons
//@import "twitter/bootstrap/glyphicons.less";

// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
//
// Example:
// @link-color: #ff0000;

I added : gem "therubyracer", gem "less-rails"

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]

gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem "therubyracer"
gem "less-rails"

console error during installation:

C:\tools\rubies\ruby-2.1.5-p273\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) E:/work/store/bin/bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/............
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.5
Using rack-test 0.6.3
Using actionpack 4.1.8
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using bundler 1.7.11
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.1.8
Using coffee-rails 4.0.1
Using commonjs 0.2.7
Using hike 1.2.3
Using multi_json 1.11.2
Using jbuilder 2.3.1
Using jquery-rails 3.1.3
Using less 2.6.0
Using tilt 1.4.1
Using sprockets 2.12.4
Using less-rails 2.7.0

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    C:/tools/rubies/ruby-2.1.5-p273/bin/ruby.exe extconf.rb 
creating Makefile
which: no python in (.;c:\tools\ruby-devkits\ruby-20\bin;c:\tools\ruby-devkits\ruby-20\mingw\bin;C:\tools\rubies\ruby-2.1.5-p273\bin;C:\ProgramData\Oracle\Java\javapath;C:\tools\rubies\ruby-2.1.5-p273\Ruby21\bin;C:\Ruby21\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\nodejs\;c:\tools\uru;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Skype\Phone\;C:\Users\vitalij\AppData\Roaming\npm)
���⥬� �� 㤠���� ���� 㪠����� ����.
which: no python in (.;c:\tools\ruby-devkits\ruby-20\bin;c:\tools\ruby-devkits\ruby-20\mingw\bin;C:\tools\rubies\ruby-2.1.5-p273\bin;C:\ProgramData\Oracle\Java\javapath;C:\tools\rubies\ruby-2.1.5-p273\Ruby21\bin;C:\Ruby21\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\nodejs\;c:\tools\uru;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Skype\Phone\;C:\Users\vitalij\AppData\Roaming\npm)
C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/ext/libv8/builder.rb:81:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently not available (RuntimeError)
    from C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/ext/libv8/builder.rb:55:in `block in build_libv8!'
    from C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/ext/libv8/builder.rb:52:in `chdir'
    from C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/ext/libv8/builder.rb:52:in `build_libv8!'
    from C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11/ext/libv8/location.rb:24:in `install!'
    from extconf.rb:7:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.11 for inspection.
Results logged to C:/tools/rubies/ruby-2.1.5-p273/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/libv8-3.16.14.11/gem_make.out
An error occurred while installing libv8 (3.16.14.11), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.16.14.11'` succeeds before bundling.

Process finished with exit code 5

Solution

  • I used another gem :bootstrap-sass

    and it worked

    Warning using twitter-bootstrap-rails generators on Windows