The rails s
command is showing this issue bellow; I have no idea what it is? this project use to run fine; I haven’t change much either.
[vns@betito perseus]$ rails s /usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = v8::Handle<v8::Value>; _Alloc = std::allocator<v8::Handle<v8::Value> >; std::vector<_Tp, _Alloc>::reference = v8::Handle<v8::Value>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. Aborted (core dumped)
My env:
Fedora 28 ruby 2.5.1 rails 5.2.0 libg++ 8.1.1
The weird thing is that I execute the same command in another project and it run just fine.
I am missing something?
[vns@betito perseus]$ rails The most common rails commands are: generate Generate new code (short-cut alias: "g") console Start the Rails console (short-cut alias: "c") server Start the Rails server (short-cut alias: "s") test Run tests except system tests (short-cut alias: "t") test:system Run system tests dbconsole Start a console for the database specified in config/database.yml (short-cut alias: "db") new Create a new Rails application. "rails new my_app" creates a new application called MyApp in "./my_app" All commands can be run with -h (or --help) for more information. In addition to those commands, there are: /usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = v8::Handle<v8::Value>; _Alloc = std::allocator<v8::Handle<v8::Value> >; std::vector<_Tp, _Alloc>::reference = v8::Handle<v8::Value>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed. Aborted (core dumped)
If I try the command along it work but it got broke at the end.
Advertisement
Answer
It seems to be this ‘gem “less-rails”‘; thanks for the help
I removed the gem and the server run fine; I have to check if there is a old version for this that works.
the issue is related to this _GLIBCXX_ASSERTIONS compilation flag was turned on by default in Fedora 28; and it causing a lot of software malfunctions.
more updates: I found the issue and it is related to ‘therubyracer’ lib There is a bug with the use of vector out of bounds.
to this line: return &vector[0];
on file: ext/v8/rr.h#L223
so now that the libstdc++ 8.1 is checking with assertions ON.
I tested it using my own branch library and it is working.