Hello Jekyll support users
I need serve this repository on Jekyll, but I has this error on Ubuntu 17.04 Terminal
geraldo#geraldo-Dell-System-XPS-L322X:~/Documentos/activate.mozilla.community$ bundle exec jekyll serve --config ./_config-dev.yml
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/drops/document_drop.rb:8: warning: already initialized constant Jekyll::Drops::DocumentDrop::NESTED_OBJECT_FIELD_BLACKLIST
/usr/lib/ruby/vendor_ruby/jekyll/drops/document_drop.rb:8: warning: previous definition of NESTED_OBJECT_FIELD_BLACKLIST was here
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/drops/drop.rb:8: warning: already initialized constant Jekyll::Drops::Drop::NON_CONTENT_METHODS
/usr/lib/ruby/vendor_ruby/jekyll/drops/drop.rb:8: warning: previous definition of NON_CONTENT_METHODS was here
Configuration file: ./_config-dev.yml
Configuration file: ./_config-dev.yml
jekyll 3.1.6 | Error: uninitialized constant Jekyll::Filters::URLFilters
Anyone here to help me?
I had this problem and it turned out to be that I was using Jekyll from Ubuntu (giving version 3.1.6, as you have) instead of a recent one (such as 3.6.2). Removing jekyll with:
sudo apt-get remove jekyll
and then strictly using bundle cleared things up. Also maybe try bundle update.
When I run gem install thin under Ruby 2.1.7 (ruby 2.1.7p400 (2015-08-18 revision 51632) [i386-mingw32]), I get following errors.
D:\dev\myapp>gem install thin
Building native extensions. This could take a while...
ERROR: Error installing thin:
ERROR: Failed to build gem native extension.
C:/Ruby21/bin/ruby.exe extconf.rb
[...]
compiling cmain.cpp
cmain.cpp: In function 'int evma_send_file_data_to_connection(uintptr_t, const c
har*)':
cmain.cpp:802:20: error: 'fstat' was not declared in this scope
if (fstat (Fd, &st)) {
^
make: *** [cmain.o] Error 1
make failed, exit code 2
How can I work around this error?
Full log is available here.
I believe this was a known bug in earlier versions of the ruby devkit. Unfortunately I cannot find a reference to the fix.
Install the latest devkit and try again, this should solve your problem.
OK, I’m at the end of my tether with this. There are a few similar questions but they all refer to therubyracer 0.10, and they mostly conclude that the problem can be fixed by upgrading to 0.12.
I’m having similar problems, but when I use 0.12.
Similar questions
Installing libv8 gem on Mavericks
How to fix libv8 error from Gemfile on Mavericks?
I’m having problems using ‘standard’ (xcode?) gcc, and both apple-gcc42 and gcc from homebrew. I’ve tried both --with-system-v8 and --without-system-v8, and again, no dice.
Here’s some logs:
Starting from scratch…
$ cd ~/Documents/code/website
$ rvm gemset empty
$ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin10.8.0]
$ grep rubyracer Gemfile
gem 'therubyracer', '~> 0.12.0'
$ brew list | grep v8
$ cat ~/.bundle/config
$ cat .bundle/config
BUNDLE_BIN: bin
$ $CXX
$ $CPP
$ $CC
$ which gcc
/usr/bin/gcc
$ which g++
/usr/bin/g++
$ g++ -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-
gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
Try a bundle install
Installing libv8 (3.16.14.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/chris/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Using compiler: g++
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
^
1 error generated.
make[1]: *** [/Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o] Error 1
make: *** [x64.release] Error 2
/Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
from /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `each'
from /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `verify_installation!'
from /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:26:in `install!'
from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=x64 \
-S.x64 -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3
CXX(target) /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
CXX(target) /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
CXX(target) /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
CXX(target) /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
CXX(target) /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
Gem files will remain installed in /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3 for inspection.
Results logged to /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/gem_make.out
An error occurred while installing libv8 (3.16.14.3), and Bundler cannot continue.
Bad times.
Error message advises that gcc 4.4+ is recommended. We can do that.
$ export CXX=/usr/local/Cellar/gcc48/4.8.2/bin/g++-4.8
$ export CPP=/usr/local/Cellar/gcc48/4.8.2/bin/cpp-4.8
$ export CC=/usr/local/Cellar/gcc48/4.8.2/bin/gcc-4.8
$ which $CXX
/usr/local/Cellar/gcc48/4.8.2/bin/g++-4.8
$ which $CPP
/usr/local/Cellar/gcc48/4.8.2/bin/cpp-4.8
$ which $CC
/usr/local/Cellar/gcc48/4.8.2/bin/gcc-4.8
$ bundle install
…
Installing libv8 (3.16.14.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/chris/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
creating Makefile
Compiling v8 for x64
Using python 2.7.5
Using compiler: /usr/local/Cellar/gcc48/4.8.2/bin/g++-4.8
g++-4.8: error: unrecognized command line option '-Wnewline-eof'
make[1]: *** [/Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o] Error 1
make: *** [x64.release] Error 2
/Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
from /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `each'
from /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `verify_installation!'
from /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/location.rb:26:in `install!'
from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=x64 \
-S.x64 -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3
CXX(target) /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
Gem files will remain installed in /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3 for inspection.
Results logged to /Users/chris/.rvm/gems/ruby-1.9.3-p448#website/gems/libv8-3.16.14.3/ext/libv8/gem_make.out
An error occurred while installing libv8 (3.16.14.3), and Bundler cannot continue.
Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling.
Worse times!
OK. So to fix the issues with therubyracer 0.10, some people recommend brew installing v8, then telling rubygems to use system v8. Let’s see what happens!
$ brew install v8
==> Downloading https://github.com/v8/v8/archive/3.21.17.tar.gz
Already downloaded: /Library/Caches/Homebrew/v8-3.21.17.tar.gz
==> Checking out http://gyp.googlecode.com/svn/trunk
==> make native -j4 library=shared snapshot=on console=readline i18nsupport=off
🍺 /usr/local/Cellar/v8/3.21.17: 21 files, 27M, built in 3.4 minutes
$ cat ~/.bundle/config
---
BUNDLE_BUILD__LIBV8: --with-system-v8
$ bundle install
…
Installing therubyracer (0.12.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/chris/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... yes
creating Makefile
make
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
./rr.h:463:14: error: no type named 'AccessorGetter' in namespace 'v8'
inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
~~~~^
./rr.h:464:14: error: no type named 'AccessorSetter' in namespace 'v8'
inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? &AccessorSetter : 0;}
~~~~^
./rr.h:466:14: error: no type named 'NamedPropertyGetter' in namespace 'v8'
inline v8::NamedPropertyGetter namedPropertyGetter() {return &NamedPropertyGetter;}
~~~~^
./rr.h:467:14: error: no type named 'NamedPropertySetter' in namespace 'v8'
inline v8::NamedPropertySetter namedPropertySetter() {return RTEST(set) ? &NamedPropertySetter : 0;}
~~~~^
./rr.h:468:14: error: no type named 'NamedPropertyQuery' in namespace 'v8'
inline v8::NamedPropertyQuery namedPropertyQuery() {return RTEST(query) ? &NamedPropertyQuery : 0;}
~~~~^
./rr.h:469:14: error: no type named 'NamedPropertyDeleter' in namespace 'v8'
inline v8::NamedPropertyDeleter namedPropertyDeleter() {return RTEST(deleter) ? &NamedPropertyDeleter : 0;}
~~~~^
./rr.h:470:14: error: no type named 'NamedPropertyEnumerator' in namespace 'v8'
inline v8::NamedPropertyEnumerator namedPropertyEnumerator() {return RTEST(enumerator) ? &NamedPropertyEnumerator : 0;}
~~~~^
./rr.h:472:14: error: no type named 'IndexedPropertyGetter' in namespace 'v8'
inline v8::IndexedPropertyGetter indexedPropertyGetter() {return &IndexedPropertyGetter;}
~~~~^
./rr.h:473:14: error: no type named 'IndexedPropertySetter' in namespace 'v8'
inline v8::IndexedPropertySetter indexedPropertySetter() {return RTEST(set) ? &IndexedPropertySetter : 0;}
~~~~^
./rr.h:474:14: error: no type named 'IndexedPropertyQuery' in namespace 'v8'
inline v8::IndexedPropertyQuery indexedPropertyQuery() {return RTEST(query) ? &IndexedPropertyQuery : 0;}
~~~~^
./rr.h:475:14: error: no type named 'IndexedPropertyDeleter' in namespace 'v8'
inline v8::IndexedPropertyDeleter indexedPropertyDeleter() {return RTEST(deleter) ? &IndexedPropertyDeleter : 0;}
~~~~^
./rr.h:476:14: error: no type named 'IndexedPropertyEnumerator' in namespace 'v8'
inline v8::IndexedPropertyEnumerator indexedPropertyEnumerator() {return RTEST(enumerator) ? &IndexedPropertyEnumerator : 0;}
~~~~^
./rr.h:482:16: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
Info(const v8::AccessorInfo& info);
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
./rr.h:488:18: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
inline const v8::AccessorInfo* operator->() {return this->info;}
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
./rr.h:502:11: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
const v8::AccessorInfo* info;
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
./rr.h:506:85: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
static v8::Handle<v8::Value> AccessorGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
./rr.h:507:96: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
static void AccessorSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
./rr.h:509:90: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
static v8::Handle<v8::Value> NamedPropertyGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
./rr.h:510:118: error: no type named 'AccessorInfo' in namespace 'v8'; did you mean 'Accessor'?
static v8::Handle<v8::Value> NamedPropertySetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
^~~~~~~~~~~~~~~~
Accessor
./rr.h:456:7: note: 'Accessor' declared here
class Accessor {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [accessor.o] Error 1
Gem files will remain installed in /Users/chris/.rvm/gems/ruby-1.9.3-p448/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/chris/.rvm/gems/ruby-1.9.3-p448/gems/therubyracer-0.12.1/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.12.1), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling.
Completely scratching my head, and already wasted hours on this. If you can spot what’s going wrong and help me fix it, you’ll be my hero(ine) forever.
I was able to proceed with ruby racer after rm Gemfile.lock Perhaps try this, which is easier than the RVM nuke option.
beforehand:
I installed v8 via brew install v8, and then did gem install libv8 -v '3.16.14.3' -- --with-system-v8
and I am running 10.10 Yosemite
I was able to get things going again by running gem install libv8 -v '3.16.14.3' -- --with-system-v8.
Reference: https://github.com/cowboyd/libv8/issues/120
OK, so this is now sorted.
For future people with the same problem, I was suffering from having ruby built against a previous installation of OS X.
Fixed by completely nuking rvm and starting from scratch, though I imagine you could just uninstall/reinstall the offending ruby.
More details on how the problem was solved here:
https://github.com/cowboyd/libv8/issues/120
Same issue with OSX 10.9.3, ruby 2.1.3 and every version of therubyracer.
Now i'm letting execjs (uglifier gem dependencie) take care of it.
ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program, then returns the result to you as a Ruby object.
OSX users
"Apple JavaScriptCore" comes as default for JS runtime on OSX. Just installing execjs will solve the problem.
Linux users
Install node.js. Execjs gem will automatically choose node.js as js runtime.
sudo apt-get install nodejs
More information on github:
https://github.com/sstephenson/execjs
It could be that rubygems is fetching the wrong binaries for your system.
Diagnosis:
Compare the output of gem env platform to 'Kernel Version' under > About This Mac > System Report > Software
If those don't match (e.g. Kernel Version: 14.4.0 and x86_64-darwin-12) then RubyGems is grabbing the wrong version of therubyracer and libv8 for your system
Fix:
short-term: bundle update therubyracer --platform=x86_64-darwin-14
This issue no longer exists in the latest version of therubyracer (0.12.3).
bundle update therubyracer
I had this same problem when I upgraded from OSX Mountain Lion to OSX Mavericks.
The patch level of ruby 1.8.7 apparently matters.
Upgrading from ruby-1.8.7-p354 to ruby-1.8.7-375 did the trick for me.
libv8 (3.16.14.3-x86_64-darwin-13) and the therubyracer (0.12.0) gems installed without problem.
assuming you use rbenv:
rbenv versions
system
* 1.8.7-p354
2.0.0-rc2
rbenv uninstall 1.8.7-p354
rbenv install 1.8.7-p375
rbenv versions
system
* 1.8.7-p375
2.0.0-rc2
bundle install
Any ideas why I get this error when trying to install the ruby-box gem?
C:\>gem install ruby-box
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ruby-box-1.2.0/spec/fixtures/i☺ e?↨f§↓.jpg
It seems to be complaining about the ruby-box-master\spec\fixtures\遠志教授.jpg file, which is not written in English.
You should probably move to the newer ruby SDK: https://github.com/attachmentsme/ruby-box
It is all built on the V2 API. V1 API will be shut down at the end of 2013.
Update ruby-box to 1.2.1 (still need to test it)
I have Ruby and Rails installed with RVM in a Mac OS X Lion environment.
I made Rails work properly with the mysql2 gem (using the MAMP libs rather than a mysql install). So everything was fine...
Until I've tried to write a standalone ruby script (out of a Rails context). And now I can't get the mysql2 gem to work.
From within the script or from the Ruby command line (irb), the
require "mysql2"
instruction leads to the following error:
1.9.2p290 :001 > require "mysql2"
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info
Referenced from: /Users/mick/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Expected in: flat namespace
dyld: Symbol not found: _mysql_get_client_info
Referenced from: /Users/mick/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Expected in: flat namespace
I've tried several stuff:
export DYLD_LIBRARY_PATH=/Applications/MAMP/Library/lib/mysql/:$DYLD_LIBRARY_PATH
using sudo ln -s /Applications/MAMP/Library/lib/mysql/libmysqlclient.16.dylib /usr/lib/libmysqlclient.16.dylib
Nothing worked. I think I'm gonna cry soon...
Strangely, this happened just today with a co-worker. Here's what I did to fix it:
gem uninstall mysql2
brew install mysql
gem install mysql2
It was as simple as that. Hope it also works for you!