I've just created a new Jekyll site, which I am building locally (Linux Mint 20.2) and then uploading _site via ftp to my server. I don't know what it is about my setup, but I always have problems building/serving Jekyll locally, that always seem to depend on various versioning and/or syntax issues. This is my latest...
When I build or serve I get an error seemingly generated by sass/css/scss compilation, which ends the process with:
/var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:200:in `rescue in sass_convert': Error: File to import not found or unreadable: reset. (Jekyll::Converters::Scss::SyntaxError)
on line 5:1 of style.scss
>> #import "reset";
^
Where the error is: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
I have read about similar issues, where they suggested removing the two lines of --- at the start of style.scc OR removing the semi-colons in those first two import lines.
My style.scss starts ... and ends as follows:
---
---
//
// IMPORTS
//
#import "reset";
#import "variables";
// Syntax highlighting #import is at the bottom of this file
/**************/
/* BASE RULES */
/**************/
html {
font-size: 100%;
}
body {
background: $white;
font: 18px/1.4 $helvetica;
color: $darkGray;
}
etc ...
footer {
padding: 20px 0;
text-align: center;
}
// Settled on moving the import of syntax highlighting to the bottom of the CSS
// ... Otherwise it really bloats up the top of the CSS file and makes it difficult to find the start
#import "highlights";
#import "svg-icons";
Funnily enough, when I tried removing the two lines of --- yesterday this did actually work (!), but then today (after reboot overnight) I tried to build/serve the same site and got an error that style.css didn't exist (i.e. my site built but not styles, just content).
So I put those two lines of --- back in, and I am back to the original error: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
So, what is going on and why won't my site build?
I am pasting the full output from the failed build (fails the same for serve):
john#mint:~/site/myjekyllsite$ jekyll build
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.3.20). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.20`.
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
The dependency http_parser.rb (~> 0.6.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Configuration file: /home/john/site/myjekyllsite/_config.yml
Source: /home/john/site/myjekyllsite
Destination: /home/john/site/myjekyllsite/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'style.scss':
Error: File to import not found or unreadable: reset. on line 5:1 of style.scss >> #import "reset"; ^
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `build` command
for any additional information or backtrace.
------------------------------------------------
Traceback (most recent call last):
30: from /home/john/gems/bin/jekyll:23:in `<main>'
29: from /home/john/gems/bin/jekyll:23:in `load'
28: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
27: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
22: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
3: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:195:in `sass_convert'
1: from /var/lib/gems/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
style.scss:5: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
on line 5:1 of style.scss
>> #import "reset";
^
29: from /home/john/gems/bin/jekyll:23:in `<main>'
28: from /home/john/gems/bin/jekyll:23:in `load'
27: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
22: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
3: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
1: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:192:in `sass_convert'
/var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:200:in `rescue in sass_convert': Error: File to import not found or unreadable: reset. (Jekyll::Converters::Scss::SyntaxError)
on line 5:1 of style.scss
>> #import "reset";
^
And with --trace
john#mint:~/site/myjekyllsite$ jekyll build --trace
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.3.20). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.20`.
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
The dependency http_parser.rb (~> 0.6.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Configuration file: /home/john/site/myjekyllsite/_config.yml
Source: /home/john/site/myjekyllsite
Destination: /home/john/site/myjekyllsite/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'style.scss':
Error: File to import not found or unreadable: reset. on line 5:1 of style.scss >> #import "reset"; ^
Traceback (most recent call last):
30: from /home/john/gems/bin/jekyll:23:in `<main>'
29: from /home/john/gems/bin/jekyll:23:in `load'
28: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
27: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
22: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
3: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:195:in `sass_convert'
1: from /var/lib/gems/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
style.scss:5: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
on line 5:1 of style.scss
>> #import "reset";
^
29: from /home/john/gems/bin/jekyll:23:in `<main>'
28: from /home/john/gems/bin/jekyll:23:in `load'
27: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
22: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
3: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
1: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:192:in `sass_convert'
/var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:200:in `rescue in sass_convert': Error: File to import not found or unreadable: reset. (Jekyll::Converters::Scss::SyntaxError)
on line 5:1 of style.scss
>> #import "reset";
^
The problem here is nothing to do with the main CSS file. The files were in _sass and were all prefixed _ and were .scss files.
It tries to find the imported CSS files (reset, variables, highlights, SVG-icons) but could not.
I'd been copying across some CSS from another working project but hadn't copied these files, which is why the error came. Once I'd pasted these across into the new project (in folder _sass, main directory of project) then it built and serve just fine.
Thanks, #Christian for the pointer to get here.
Related
Maybe it removed in new version, so how to set 'mimemagic' with old version?, please!
/home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- mimemagic/overlay (LoadError)
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `block in require'
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:299:in `load_dependency'
from /home/patrick/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `require' ...
I believed this is related to the recent changes in mimemagic.
https://github.com/rails/rails/issues/41757
After i upgraded the rails to 6.1.3.1, I had the same issues and solved it by changing mimemagic version to 0.3.8 in Gemfile.lock file.
I am having some trouble installing packages in R on CentOS after updating R. Here is an example of what happens when I try to install a package in R:
> install.packages("ggplot2")
Installing package into '/home/albers/R/x86_64-pc-linux-gnu-library/3.2'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) :
internet routines cannot be loaded
In addition: Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
unable to load shared object '/usr/local/lib64/R/modules//internet.so':
/usr/local/lib64/R/modules//internet.so: undefined symbol: curl_multi_wait
HTTPS CRAN mirror
1: 0-Cloud [https] 2: Austria [https]
3: Chile [https] 4: China (Beijing 4) [https]
5: Colombia (Cali) [https] 6: France (Lyon 2) [https]
7: France (Paris 2) [https] 8: Germany (M▒nster) [https]
9: Iceland [https] 10: Mexico (Mexico City) [https]
11: Russia (Moscow) [https] 12: Spain (A Coru▒a) [https]
13: Switzerland [https] 14: UK (Bristol) [https]
15: UK (Cambridge) [https] 16: USA (CA 1) [https]
17: USA (KS) [https] 18: USA (MI 1) [https]
19: USA (TN) [https] 20: USA (TX) [https]
21: USA (WA) [https] 22: (HTTP mirrors)
Selection: 1
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
internet routines cannot be loaded
Warning message:
package 'ggplot2' is not available (for R version 3.2.5)
So I spent some time searching the error messages. I updated my version of curl which now is up to date:
$ curl -V
curl 7.48.0 (x86_64-pc-linux-gnu) libcurl/7.48.0 zlib/1.2.8
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Features: IPv6 Largefile libz UnixSockets
Still unable to install packages and am receiving the same error message. So I tried following the instructions of this post , specifically adding the following command to my .bash_profile:
export LD_LIBRARY_PATH=$TOOLS/curl-7.48.0/lib:$LD_LIBRARY_PATH
Again I get the same error message about R unable to load shared objects. Ultimately this is a download issue as download.file fails as well. Here is my sessionInfo():
R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.2 (Final)
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=en_US.iso885915 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
I am able to download files with wget and curl but as soon as I start R, I unable to download anything.
Does anyone have any suggestions on how I might get around this issue?
Try it like this.
install.packages("ggplot2", repos="http://cran.cnr.berkeley.edu")
or just before you install it change your download tool to something else ie on Linux you can try wget as follows.
options(download.file.method = "wget")
Note, I've dropped the https for http. I had a similar error...
Selection: 1
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
unsupported URL scheme
Warning message:
package ‘ggplot2’ is not available (for R version 3.2.3)
If you look at the output of the following line from your question...
Yours
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Mine (Also Centos 6)
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Your curl is missing https support. There was an error regarding curl_multi_wait in your output as well. This was added in 7.28.0.
https://curl.haxx.se/libcurl/c/curl_multi_wait.html
If you need to build curl locally do this
mkdir -p $HOME/curl
cd $HOME/curl
git clone https://github.com/curl/curl.git
cd curl
bash buildconf
./configure --prefix=$HOME/libcurl
make
make install
At this point you need to setup your LD_LIBRARY_PATH in .bash_profile ie
export LD_LIBRARY_PATH=$HOME/libcurl/lib:$LD_LIBRARY_PATH
Then either logout and back in again or
source ~/.bash_profile
I believe I answered a similar question once before following the R 3.2.* upgrade last summer. Travis CI using Ubuntu 12.04 has similar issues.
One rather simple way around it is to tell R to use the external wget or curl binary you may have (and which needs to be https-ready) to download. So try eg
R> options("download.file.method"="wget")
which, when set, allows me to download your desired package from the desired non-https host:
R> install.packages("ggplot2", repos="http://cran.cnr.berkeley.edu")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--2016-04-26 18:29:16-- http://cran.cnr.berkeley.edu/src/contrib/ggplot2_2.1.0.tar.gz
Resolving cran.cnr.berkeley.edu (cran.cnr.berkeley.edu)... 169.229.201.201, 2607:f140:0:8000::201
Connecting to cran.cnr.berkeley.edu (cran.cnr.berkeley.edu)|169.229.201.201|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1571788 (1.5M) [application/x-gzip]
Saving to: ‘/tmp/RtmpwWvA3s/downloaded_packages/ggplot2_2.1.0.tar.gz’
/tmp/RtmpwWvA3s/downloaded_packages/ggplot2_2.1.0.ta 100%[========================================================================================================================>] 1.50M 1.32MB/s in 1.1s
2016-04-26 18:29:17 (1.32 MB/s) - ‘/tmp/RtmpwWvA3s/downloaded_packages/ggplot2_2.1.0.tar.gz’ saved [1571788/1571788]
* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ggplot2)
The downloaded source packages are in
‘/tmp/RtmpwWvA3s/downloaded_packages’
You can set options in ~/.Rprofile or the corresponding Rprofile.site.
I have tried to install the newly released R package called "BelgiumStatistics". This package contains all the datasets released by Statistics Belgium (Bevolking, Werk, Leefmilieu, Census 2011). The related information to the data and the package is available through several links attached here:
1. Open Data in Belgium - release of BelgiumStatistics R package
2. Open Data of Belgium - provided at GitHub
The problem is that I get a timeout error after doing exactly what the instruction says:
library(devtools)
devtools::install_github("jwijffels/StatisticsBelgium", subdir ="BelgiumStatistics")
Downloading GitHub repo jwijffels/StatisticsBelgium#master
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached
traceback()
13: .Call(R_curl_fetch_memory, url, handle)
12: curl::curl_fetch_memory(url, handle = handle)
11: request_fetch.write_memory(req$output, req$url, handle)
10: request_fetch(req$output, req$url, handle)
9: request_perform(req, hu$handle$handle)
8: httr::HEAD(src_submodules, , auth)
7: github_has_remotes(x, auth)
6: remote_download.github_remote(remote, quiet = quiet)
5: remote_download(remote, quiet = quiet)
4: FUN(X[[i]], ...)
3: vapply(remotes, install_remote, ..., FUN.VALUE = logical(1))
2: install_remotes(remotes, ...)
1: devtools::install_github("jwijffels/StatisticsBelgium", subdir = "BelgiumStatistics")
I have seen several issues discussed here, such as :
install_github doesn't work
Error while using install_github | devtools | timeout issue
Solution. How to install_github when there is a proxy
But they were not useful in my case, since I do not have any problems with proxy or downloading other packages for example from Cran . By the way, I am using RStudio (Version 0.99.486 ) with R version 3.2.2 (2015-08-14) installed on Windows 7 and I have the latest version of Rtools installed (Rtools33).
I wonder that whether it is the problem of this package which has about 100MB or the GitHub itself. I downloaded the package from GitHub and I tried to install the package from zip file or even pasting it directly to the place that I have all the other libraries installed (i.e. C:\Users\xxx\Documents\R\win-library) but it failed too. So, What could be the solution?
I am a ruby and rails newbie, so my abilities to debug this are somewhat limited.
I have just added the eclipse plugin which failed, then downloaded the latest aptana studio which also failed. The failure was the same in both cases.
The nature of the failure is that when I create a new rails project, I get an error message about an incompatible library version "C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/http11.so". The project is actually created, along with directories and files.
Google searches around this error message have only returned a couple of hits, which were not very helpful
I am wondering if this is about 64 bit libraries.
My software stack is:
Windows 7 home premium 64bit
Aptana RadRails, build: 2.0.5.1278709071
Ruby1.9.3 gem 1.8.24
The console shows:
"4320"
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': incompatible library version - C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/http11.so (LoadError)
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:12:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `const_get'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `block in get'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.4/lib/commands/server.rb:45:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from script/server:3:in `<top (required)>'
from -e:2:in `load'
from -e:2:in `<main>'
As noted above this is about a version of mongrel. See http://en.wikipedia.org/wiki/Mongrel_(web_server).
An important section is that is:
After the original author Zed Shaw left the Ruby on Rails-scene[4] the releases of Mongrel stopped. The current release 1.1.5 is no longer able to install in Ruby versions higher than 1.9.2 which is recommended for Rails 3, the fix is to use the much older 1.2.0-pre2 release of Mongrel which isn't stable.
As I am a naive ruby user, I thought I would go through the steps to make Aptana work.
1: run the command line interpreter, ensuring ruby is on the path
2: gem install -v 1.2.0-pre2 mongrel
3: Run aptana
4: open windows/preferences/rails
5: set the mongrel_rails path
I found my mongrel_rails path in <ruby_home>/lib/ruby/gems/1.9.1/mongrel-1.2.0.pre2-x86-mingw32/bin/mongrel_rails
Hope this is helpful to others
I'm trying to install RSRuby on Ubuntu 10.04. I barely even know what error messages to report as the relevant ones; I've just been googling around for several hours and none of the commands I try solve the problem.
Here are a few sample error messages:
$ sudo gem install rsruby -- --with-R-dir=/usr/lib/R
Building native extensions. This could take a while...
ERROR: Error installing rsruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R
checking for main() in -lR... yes
checking for R.h... no
ERROR: Cannot find the R header, aborting.
Gem files will remain installed in /var/lib/gems/1.8/gems/rsruby-0.5.1.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ext/gem_make.out
or doing it with apt-get:
$ sudo gem install rsruby --include-dependencies -- --with-R-dir=/usr/lib/R/lib64/R --with-R-lib=/usr/lib/R/lib64/R/bin --with-R-include=/usr/lib/R/lib64/R/include
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
ERROR: Error installing rsruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R/lib64/R --with-R-lib=/usr/lib/R/lib64/R/bin --with-R-include=/usr/lib/R/lib64/R/include
checking for main() in -lR... no
ERROR: Cannot find the R library, aborting.
Gem files will remain installed in /var/lib/gems/1.8/gems/rsruby-0.5.1.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ext/gem_make.out
I also got the latest RSRuby from GitHub and following the instructions from its 2006 PDF manual:
$ ruby setup.rb config -- --with-R-dir=/usr/lib/R
---> lib
---> lib/rsruby
<--- lib/rsruby
<--- lib
---> ext
/usr/bin/ruby1.8 /home/mars/R/rsruby/ext/extconf.rb --with-R-dir=/usr/lib/R
checking for main() in -lR... yes
checking for R.h... no
ERROR: Cannot find the R header, aborting.
*** /home/mars/R/rsruby/ext/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=/home/mars/R/rsruby/ext
--curdir
--ruby=/usr/bin/ruby1.8
--with-R-dir
--with-R-include
--without-R-include=${R-dir}/include
--with-R-lib
--without-R-lib=${R-dir}/lib
--with-Rlib
--without-Rlib
setup.rb:655:in `command': system("/usr/bin/ruby1.8" "/home/mars/R/rsruby/ext/extconf.rb" "--with-R-dir=/usr/lib/R") failed (RuntimeError)
from setup.rb:660:in `ruby'
from setup.rb:1238:in `extconf'
from setup.rb:1230:in `config_dir_ext'
from setup.rb:1532:in `__send__'
from setup.rb:1532:in `traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1524:in `exec_task_traverse'
from setup.rb:1519:in `each'
from setup.rb:1519:in `exec_task_traverse'
from setup.rb:1223:in `exec_config'
from setup.rb:991:in `exec_config'
from setup.rb:826:in `__send__'
from setup.rb:826:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
and in irb:
irb(main):002:0> require 'RSRuby'
LoadError: no such file to load -- RSRuby
from (irb):2:in `require'
from (irb):2
from :0
irb(main):003:0> rsruby
NameError: undefined local variable or method `rsruby' for main:Object
from (irb):3
from :0
Sometimes I'm seemingly able to get something that looks like it works, but still can't load rsruby from the irb command line.
$ sudo gem install rsruby --include-dependencies -- --with-R-dir=/usr/lib/R --with-R-lib=/usr/lib/R --with-R-include=/usr/share/R/include/
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
Successfully installed rsruby-0.5.1.1
1 gem installed
Installing ri documentation for rsruby-0.5.1.1...
Installing RDoc documentation for rsruby-0.5.1.1...
then
$ irb
irb(main):001:0> require 'rsruby'
LoadError: no such file to load -- rsruby
from (irb):1:in `require'
from (irb):1
from :0
Ruby is version 1.8.7, I did sudo apt-get install ruby1.8-dev today but I'm not sure if that left things worse, better, or unchanged. Or if this would be easier in ruby1.9.
R is working.
I don't read Japanese but this worked for me on Ubuntu 10.10, ruby 1.9: http://d.hatena.ne.jp/cuspos/20090520/1242825057
# gem install rsruby-0.5.1.1.gem -- --with-R-dir=/usr/lib/R --with-R-include=/usr/share/R/include
Building native extensions. This could take a while...
Successfully installed rsruby-0.5.1.1
1 gem installed
# export R_HOME=/usr/lib/R
# irb
irb(main):001:0> require 'rsruby'
=> true
irb(main):002:0>
You might want to check to see if your PATH variables or dynamic links are set up so that Ruby and friends are "looking" in the right place. Ruby appears to expect RSruby to be in /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ or perhaps /usr/lib/ruby/1.8/rubygems/ or perhaps /var/lib/gems/1.8/gems/rsruby-0.5.1.1/lib/, .... while your configure report says it was installed in /usr/bin/ruby1.8 /home/chris/R/. I don't have a ton of Linux experience, but what I do have tells me that each distro is different with respect to where it expects to find installed executables.
Your attempts with apt-get and gem install suggest that the installer cannot find the R header files. I would start by fixing this problem, not try other ways of installing RSruby. The next question is why it cannot find the R headers, there are two options:
The headers are installed, but they cannot be found. Use locate R.h to find where the R header file is located, and make sure this is in your $PATH.
The headers are not installed (which I suspect is the case). Often installing header files requires a development package to be installed. Try and see if there is an R-dev package or something named similarly which would contain, among others, the R header file. Installing this R-dev can be done using apt-get. The standard version of R in ubuntu 10.04 is not really up-to-date I think. CRAN has ubuntu repositories, where the dev package is called r-base-dev. Adding this repo to your sources.list gets you the latest version of R from CRAN through apt-get.
You have successfully installed rsruby, as shown by the output from your 5th example:
Successfully installed rsruby-0.5.1.1
1 gem installed
The library did not load in irb because using Ruby 1.8.7, you need to "require rubygems" first. Try this in irb:
require 'rubygems'
require 'rsruby'