Closed jask05 closed 7 years ago
Thanks for your reply.
I have some problemas with this:
apt-get install mysql-server mysql-client libmysqlclient-dev
I get:
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
[sudo] password for kuro:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-client-10.1
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
mariadb-server-10.1
Package libmysqlclient-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'mysql-server' has no installation candidate
E: Package 'mysql-client' has no installation candidate
E: Package 'libmysqlclient-dev' has no installation candidate
How can I solve it? Adding a different resource in source.list?
Thanks
MariaDB is a fork of mysql so I'll assume that you can simply use libmariadb-client-lgpl-dev mariadb-client-10.1 mariadb-server-10.1
instead of mysql.
EDIT: The apt
command would be sudo apt install libmariadb-client-lgpl-dev mariadb-client-10.1 mariadb-server-10.1
instead.
Yes, I did that installation but when I type:
cd dradis-ce
./bin/setup
I got this error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/gems/mysql2-0.3.18/ext/mysql2
/usr/bin/ruby2.3 -r ./siteconf20170207-1851-1sfj96w.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
-----
-----
Setting libpath to /usr/lib/x86_64-linux-gnu
-----
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/extensions/x86_64-linux/2.3.0/mysql2-0.3.18/mkmf.log
current directory: /tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/gems/mysql2-0.3.18/ext/mysql2
make "DESTDIR=" clean
current directory: /tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/gems/mysql2-0.3.18/ext/mysql2
make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
linking shared-object mysql2/mysql2.so
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
Makefile:255: recipe for target 'mysql2.so' failed
make: *** [mysql2.so] Error 1
make failed, exit code 2
Gem files will remain installed in /tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/gems/mysql2-0.3.18 for inspection.
Results logged to /tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/extensions/x86_64-linux/2.3.0/mysql2-0.3.18/gem_make.out
An error occurred while installing mysql2 (0.3.18), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.18'` succeeds before bundling.
== Command ["bundle install"] failed ==
So I don't know what is the next step :(
Thanks!
Could you post the content of /tmp/bundler20170207-1851-1r1dm7cmysql2-0.3.18/extensions/x86_64-linux/2.3.0/mysql2-0.3.18/mkmf.log
? (limited to the error if possible)
I don't know why but this file doesn't exist (I'm looking for it using root user). Instead of that, I've got this file:
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.3.21/mkmf.log
Content:
have_header: checking for ruby/thread.h... -------------------- yes
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"gcc -E -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby/thread.h>
/* end */
--------------------
have_func: checking for rb_thread_call_without_gvl() in ruby/thread.h... -------------------- yes
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby/thread.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: printf("%p", &t);
11: }
12:
13: return 0;
14: }
15: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_call_without_gvl; return !p; }
/* end */
--------------------
have_func: checking for rb_thread_blocking_region()... -------------------- no
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:13:57: error: ‘rb_thread_blocking_region’ undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return !p; }
^~~~~~~~~~~~~~~~~~~~~~~~~
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_thread_blocking_region; return !p; }
/* end */
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
/tmp/ccoKzl5u.o: In function `t':
/var/lib/gems/2.3.0/gems/mysql2-0.3.21/ext/mysql2/conftest.c:14: undefined reference to `rb_thread_blocking_region'
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: extern void rb_thread_blocking_region();
14: int t(void) { rb_thread_blocking_region(); return 0; }
/* end */
--------------------
have_func: checking for rb_wait_for_single_fd()... -------------------- yes
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:13:57: error: ‘rb_wait_for_single_fd’ undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return !p; }
^~~~~~~~~~~~~~~~~~~~~
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_wait_for_single_fd; return !p; }
/* end */
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: extern void rb_wait_for_single_fd();
14: int t(void) { rb_wait_for_single_fd(); return 0; }
/* end */
--------------------
have_func: checking for rb_hash_dup()... -------------------- yes
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_hash_dup; return !p; }
/* end */
--------------------
have_func: checking for rb_intern3()... -------------------- yes
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:13:57: error: ‘rb_intern3’ undeclared (first use in this function)
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_intern3; return !p; }
^~~~~~~~~~
conftest.c:13:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_intern3; return !p; }
/* end */
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: printf("%p", &t);
9: }
10:
11: return 0;
12: }
13: extern void rb_intern3();
14: int t(void) { rb_intern3(); return 0; }
/* end */
--------------------
have_header: checking for mysql.h... -------------------- yes
"gcc -E -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/include/mysql -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <mysql.h>
/* end */
--------------------
have_header: checking for errmsg.h... -------------------- yes
"gcc -E -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/include/mysql -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <errmsg.h>
/* end */
--------------------
have_header: checking for mysqld_error.h... -------------------- yes
"gcc -E -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/include/mysql -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <mysqld_error.h>
/* end */
--------------------
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/include/mysql -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl -lruby-2.3 -Wall -funroll-loops -lpthread -lgmp -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.3.0 -I/usr/include/ruby-2.3.0/ruby/backward -I/usr/include/ruby-2.3.0 -I. -I/usr/include/mysql -I/usr/local/opt/openssl/include -g -O2 -fdebug-prefix-map=/build/ruby2.3-8Td9HM/ruby2.3-2.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/opt/openssl/lib -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl -lruby-2.3 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -lpthread -lgmp -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
Is it a valid log?
Thanks!
Yes, thanks 😄
I found the package libmariadbclient-dev-compat
which seems to replace libmysqlclient
. Could you try this one?
Great !! It works !! Thanks.
But.. :( When I type ./bin/setup I get:
== Preparing database ==
rails aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'.
Gem Load Error is: wrong argument type Class (expected Module)
Backtrace for gem load error is:
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:23:in `include'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:23:in `block (2 levels) in <top (required)>'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:22:in `class_eval'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:22:in `block in <top (required)>'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:21:in `each'
/usr/lib/ruby/vendor_ruby/v8/conversion.rb:21:in `<top (required)>'
/var/lib/gems/2.3.0/gems/therubyracer-0.12.3/lib/v8.rb:22:in `require'
/var/lib/gems/2.3.0/gems/therubyracer-0.12.3/lib/v8.rb:22:in `<top (required)>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in `require'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in `available?'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `each'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `find'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `best_available'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:57:in `autodetect'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/uglifier-3.0.4/lib/uglifier.rb:5:in `require'
/var/lib/gems/2.3.0/gems/uglifier-3.0.4/lib/uglifier.rb:5:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:91:in `require'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:91:in `block (2 levels) in require'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:86:in `each'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:86:in `block in require'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:75:in `each'
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:75:in `require'
/usr/lib/ruby/vendor_ruby/bundler.rb:106:in `require'
/home/kuro/tools/dradis-ce/config/application.rb:12:in `<top (required)>'
/home/kuro/tools/dradis-ce/Rakefile:4:in `require_relative'
/home/kuro/tools/dradis-ce/Rakefile:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
/var/lib/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:
/home/kuro/tools/dradis-ce/config/application.rb:12:in `<top (required)>'
/home/kuro/tools/dradis-ce/Rakefile:4:in `require_relative'
/home/kuro/tools/dradis-ce/Rakefile:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
TypeError: wrong argument type Class (expected Module)
/var/lib/gems/2.3.0/gems/therubyracer-0.12.3/lib/v8.rb:22:in `require'
/var/lib/gems/2.3.0/gems/therubyracer-0.12.3/lib/v8.rb:22:in `<top (required)>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in `require'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in `available?'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `each'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `find'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `best_available'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:57:in `autodetect'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/uglifier-3.0.4/lib/uglifier.rb:5:in `require'
/var/lib/gems/2.3.0/gems/uglifier-3.0.4/lib/uglifier.rb:5:in `<top (required)>'
/home/kuro/tools/dradis-ce/config/application.rb:12:in `<top (required)>'
/home/kuro/tools/dradis-ce/Rakefile:4:in `require_relative'
/home/kuro/tools/dradis-ce/Rakefile:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/var/lib/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)
== Command ["bin/rails db:setup"] failed ==
:(
Did you do bundle install
to load the dependencies as in the guide?
Possibly related to the Ruby version (it seems you're on 2.3):
https://github.com/cowboyd/therubyracer/issues/427
Can you try running with Ruby 2.2?
Alternatively you can try a more up-to-date version of therubyracer:
Thanks, I didn't see that 👍
The machine has Ruby 2.3.3p222, I don't know how can I downgrade Ruby version :(
Also I've tried the alternative option. I've modified Gem file:
# gem 'therubyracer', platforms: :ruby
gem 'therubyracer', git: 'https://github.com/cowboyd/therubyracer.git'
But it doesn't work.
Thanks!
You can use RVM (Ruby enVironment Manager) to change your ruby version. But the installation is a bit tricky if you don't want to pipe scripts from curl right into your bash.
The easiest alternative I can offer you is a docker image I'm currently working on. I'll probably be able to push it when I get to work tomorrow. (In the meantime try out rvm, maybe this is really all you need.)
I've tried with RVM:
rvm install 2.2.0
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/Kali_Linux_Rolling/x86_64/ruby-2.2.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for debian.
Installing requirements for debian.
Updating system....
Installing required packages: libreadline6-dev, libssl-dev, libyaml-dev, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-confi.|
Requirements installation successful.
Installing Ruby from source to: /home/kuro/.rvm/rubies/ruby-2.2.0, this may take a while depending on your cpu(s)...
ruby-2.2.0 - #downloading ruby-2.2.0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12.6M 100 12.6M 0 0 1361k 0 0:00:09 0:00:09 --:--:-- 3138k
ruby-2.2.0 - #extracting ruby-2.2.0 to /home/kuro/.rvm/src/ruby-2.2.0....
ruby-2.2.0 - #applying patch /home/kuro/.rvm/patches/ruby/2.2.0/fix_installing_bundled_gems.patch.
ruby-2.2.0 - #applying patch /home/kuro/.rvm/patches/ruby/2.2.0/openssl3.patch.
ruby-2.2.0 - #configuring.........................................................
ruby-2.2.0 - #post-configuration..
ruby-2.2.0 - #compiling..............................................................................
Error running '__rvm_make -j4',
showing last 15 lines of /home/kuro/.rvm/log/1486666186_ruby-2.2.0/make.log
compiling psych_yaml_tree.c
compiling psych.c
installing default nkf libraries
installing default pathname libraries
linking shared-object psych.so
installing default psych libraries
make[2]: Leaving directory '/home/kuro/.rvm/src/ruby-2.2.0/ext/psych'
linking shared-object pathname.so
make[2]: Leaving directory '/home/kuro/.rvm/src/ruby-2.2.0/ext/pathname'
linking shared-object nkf.so
make[2]: Leaving directory '/home/kuro/.rvm/src/ruby-2.2.0/ext/nkf'
make[1]: Leaving directory '/home/kuro/.rvm/src/ruby-2.2.0'
uncommon.mk:187: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
++ return 2
There has been an error while running make. Halting the installation.
But I couldn't. I'm getting crazy hahaha.
Thanks !
So unfortunately I can't publish the container until it's gone through review. But I have a very basic version of that Dockerfile that simply starts an empty dradis-ce with an SSL Proxy.
Dockerfile
docker build -t jask05/dradis-ce .
docker run -p 8443:8443 jask05/dradis-ce
Hope that stops you from getting crazy 😄
EDIT: I found a script to install docker on 2016.1. I have not tested it but it seems legit.
There some images out there already (not with SSL though), if you search the Docker index.
Also: http://discuss.dradisframework.org/t/docker-container/156
Thanks @lfuelling and @etdsoft but I have a new problema hahaha
When I lunch docker and I access to https://localhost:8443/ I get this error:
Migrations are pending. To resolve this issue, run: bin/rails db:migrate RAILS_ENV=development
Extracted source (around line #573):
# Raises <tt>ActiveRecord::PendingMigrationError</tt> error if any migrations are pending.
def check_pending!(connection = Base.connection)
raise ActiveRecord::PendingMigrationError if ActiveRecord::Migrator.needs_migration?(connection)
end
def load_schema_if_pending!
I don't know where I have to lunch this command in order to resolver this issue, any suggestion?
Thanks
If you use my Dockerfile: docker run test/dradis-ce /dradis-git/server/bin/rails db:migrate RAILS_ENV=development
The container should execute the job and then exit. Then you can start it with the regular run command (where you specify the port)
Or even better, if the container is still running at the time this issue occurs:
docker ps
(should output the id of the container, some SHA like value)docker exec [ID] /bin/bash
cd /dradis-git/server
bin/rails db:migrate RAILS_ENV=development
@lfuelling Wooo !! It works really well hahaha Thanks a lot @lfuelling and @etdsoft PS: I had to use: sudo docker exec -i -t < id > /bin/bash
@jask05 You can suppress this by adding your user to the docker
group 😄
Hi there,
I'm triying to install Dradis on my Kali 2016.2 but I've got this error. Steps:
Error:
I don't know why. Could anybody help me?
Thanks in advance!