Jekyll site deployment to Netlify - Error gem bundle install (use Bundler 2 or >) / Failing build - github

I'm using Cloud9 and GitHub (Private Repos). I've been able to deploy basic landing pages to Netlify but I keep getting the same error message when I try to deploy any Jekyll sites. Snippet from deployment log:
> Installing gem bundle
> You must use Bundler 2 or greater with this lockfile.
> Error during gem install
> failed during stage 'building site': Build script returned non-zero exit code: 1
> Error running command: Build script returned non-zero exit code: 1
> Failing build: Failed to build site
After many many failed attempts, I created a new test dev environment. Per Jekyll docs I made sure I had the latest Ruby, RubyGems, gcc, g++, make & dependencies. Did the usual config, then Jekyll new test_directory. Steps:
> gem install jekyll bundler
> gem install bundle
> gem update --system
> cd new_directory && bundle install
> ~/new_directory/ bundle update
> ~/new_directory/ bundle exec jekyll serve
*** Works perfectly on localhost ***
At this point everything looks fine (jekyll 3.8.5 - gem 3.0.2 - ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux])
Important:
> bundler -v
returns
> Bundler version 2.0.1
After I push to completely new repo, I get the same error message as above:
"use Bundler 2 or greater with this lockfile"
Snippet from lockfile:
> DEPENDENCIES
> -jekyll (~> 3.8.5)
> -jekyll-feed (~> 0.6)
> -minima (~> 2.0)
> -tzinfo-data
> RUBY VERSION
> ruby 2.5.1p57
> BUNDLED WITH
> 2.0.1
I also added this to _config.yml file:
> url: "https://infallible-hodgkin-e15692.netlify.com/"
And per Netlify docs I added a /.ruby-version file inside my root directory with this line:
> ruby 2.5.1
After updating everything and git push, it still fails to build my site but this time I get a couple new lines on the deploy log:
>** WARNING **
> Using custom ruby version ruby 2.5.1, this will slow down the build.
> To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.
> Included versions: 2.3.6 2.4.3 2.2.9
Needless to say I tried switching to each "Included" Ruby -v (rvm use ..*). Went through the process of installing each version and repeated steps above each time. No luck.
Any suggestions as to what to try next are greatly appreciated. Sorry for the long post, I tried being as concise as possible. Please let me know if I missed anything.

So the problem was I should've been using Bundle 1 instead of Bundle 2 plus ruby 2.3.6. Make sure you're on bundle version 1. You can read a little more here:
https://bundler.io/guides/bundler_2_upgrade.html
switch to ruby 2.3.6:
> rvm use 2.3.6 (it'll give you the prompt to install it)
run this command on your project's root directory check if it worked by running bundle version
> gem install bundler -v "~>1.0"
then
> gem install jekyll
> gem install bundle
Here's what I changed on mi Gemfile.lock:
> RUBY VERSION
> ruby 2.3.6p384
> BUNDLED WITH
> 1.17.3
My Gemfile just says ruby "2.3.6" at the top and I also change the /.ruby-version file to ruby 2.3.6 (no quotes). And that's it. Don't forget to bundle exec jekyll serve, commit and push and it should be fine.

Related

ERROR:The serve command requires to be run in an Angular project, but a project definition could not be found

I am trying to clone the git repository for Tour of Heros with NgRX (blove/ngrx-tour-of-heros)
However, I can not seem to run the application.
I have updated my Angular cli to 7.3 I have installed yarn to try and help as well as tried to create a new application and remove files to drag and drop files that where not there like the node modules, and I am still getting this error.
How do I get this error removed so that I can see the file?
Check your build per-requisites, as illustrated by blove/ngrx-tour-of-heros issue 2
Breaking changes - node => 10
ERROR - "json-server requires at least version 4 of Node, please upgrade"
if your node -v is greater than 10, npm upgrade json-server
Appears that node-sass was optional on yarn install.
Had to install separately - yarn add none-sass
Also, cd client and cd server are reversed in lines 13 and 15.
The angular project is in de client directory, so after cloning the repo you have to get into the client directory before running the ng serve command:
git clone https://github.com/blove/ngrx-tour-of-heros.git
cd ./client
yarn install
npm run start
Seems like it's an older repo with Angular v5 and CLI v 1.6 - try downgrading if it doesn't work. https://github.com/blove/ngrx-tour-of-heros/blob/master/client/package.json#L32

vscode assistance with building cpptools needed

Ubuntu 18.04 ARM64
I have download and built vscode and this appears to be working.
I can see the extension market place and install extensions. The C/C++ IntelliSense, debugging, and code browsing install but gets a dependency install failure sometimes:
Updating C/C++ dependencies...
Downloading package 'Mono Framework Assemblies' (5368 KB) Done!
Installing package 'Mono Framework Assemblies'
Failed at stage: installPackages
Error: end of central directory record signature not found
It seems to succeed on the second attempt but I'm not convinced.
So I have cloned vscode-cpptools and would like to built it myself but I'm not sure what dependencies it has or how to build it correctly.
Any tips appreciated!
So following the build and debug guide at:
$ git clone -b release https://github.com/Microsoft/vscode-cpptools
$ cd vscode-cpptools/Extension
$ npm install ! should install all dependencies but it forgets gulp
$ npm install gulp ! Manually install. I wonder what else it forgets
$ vsce package ! Should trigger the build and make the vsix package.
So the package is created and when I try and install it via the vscode extensions I get
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at ~/.vscode-oss-dev/extensions/ms-vscode.cpptools-0.22.1/bin/Microsoft.VSCode.CPP.Extension.linux.
Me thinks there are a lot of other dependencies that are missing!!!
Looking in the Extension bin folder and two important binaries are missing:
Microsoft.VSCode.CPP.Extension.linux
Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
I also tried this on Intel Ubuntu 18.04 and while the Intel build appeared to do a whole lot more it also fails to build the binaries.
Found the answer in here : github.com/Microsoft/vscode-cpptools/issues/429 which indicates there is no support for Aaarch64 Arm64 at this point in time.

Installing redmine_contacts plugin for bitnami_redmine

I am trying to install redmine_contacts plugin for my redmine 2.2.3.0 (which is installed using BITNami installer), as in readme.rdoc:
Copy redmine_contacts plugin to {RAILS_APP}/plugins on your redmine path
Run bundle install --without development test RAILS_ENV=production
Run rake redmine:plugins NAME=redmine_contacts RAILS_ENV=production
The first two steps was successful, but last executing last command, following error would occur:
(in /home/.../redmine-2.2.3-0/apps/redmine/htdocs)
Could not find sprockets-2.2.1 in any of the sources
Run bundle install to install missing gems.
To see if the sprockets library is installed by executing command: #bundle show sprockets, it shows a newer version of this library is installed:
/var/lib/gems/1.8/gems/sprockets-2.2.2
I think somehow the BitNami version of gem which is installed is not compatible with the sprockets-2.2.2 on the system and it requires 2.2.1. Maybe you should change to that version.
Try something like:
gem install sprockets -v 2.2.1

Whenever gem in rails error :'to_specs': Could not find bundler (>= 0) amongst

I am using whenever gem in my application. And i have scheduled a rake task every 5 minutes. But that rake task is not running every 5 minutes. When i saw the log it gave me error like
`to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0,
io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4]
(Gem::LoadError)
this is the content in schedule.rb
every 3.minutes do
rake "mytask name"
end
I had same issue solved by putting
env :PATH, '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
instead of
env :PATH, ENV['PATH']
on the top of config/schedule.rb
This issue occurs whenever we changes in your gem file, specially rails / ruby version.
I was facing this same issue, here is what I did to get rid of that-
1. $ gem install bundle
2. $ bundle install
Now everything working fine.
If you are getting same issue as-
`to_specs': Could not find 'railties' (>= 0) among 23 total gem(s) (Gem::LoadError)
then here are the steps-
See the link as-
Rails: Could not find railties
1. $ gem list
2. $ gem install rails
It will just download all missing dependencies, including railties.
Hope this will work for you too !!!

Rails 3.1 - Pushing to Heroku - Errors installing postgres adapter?

I just upgraded to Rails 3.1 and the first app i've tried to deploy to Heroku has encountered a problem relating to Postgres adapter. I'm able to push the app to heroku but then when i try to migrate the database i get the following error:
heroku rake db:migrate
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter`
(pg is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
when I try their suggested install i get:
ERROR: Could not find a valid gem 'activerecord-postgresql-adapter' (>= 0) in any repository
ERROR: Possible alternatives: activerecord-postgis-adapter, activerecord-jdbcpostgresql-adapter, activerecord-postgresql-cursors, activerecord-jdbcmysql-adapter, activerecord-jdbcmssql-adapter
which already seems weird... so what exact gem should I install to get this thing working if not what they say I should install??
When I try installing gem pg i get:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/jerometufte/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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
...
I'm using SQLite3 currently. Any help greatly appreciated, this is baffling me.
Option 1:
Add pg to your Gemfile but skip trying to install it locally.
$ cat Gemfile
...
group :production do
# gems specifically for Heroku go here
gem "pg"
end
# Skip attempting to install the pg gem
$ bundle install --without production
Option 2 (Debian/Ubuntu):
Add pg to your Gemfile but first install the prerequisites.
$ cat Gemfile
...
group :production do
# gems specifically for Heroku go here
gem "pg"
end
# Install the pg gem's dependencies first
$ sudo apt-get install libpq-dev
# Then install the pg gem along with all the other gems
$ bundle install
You definitely need pg in the Gemfile for Heroku.
About the error you're getting locally: make sure you have postgres installed, run gem install pq -- --with-pg-config=[path to wherever your pg-config binary is], then bundle install.
Alternatively, if your local database is working fine (either because you're using sqlite or postgres-pr), you could put the gem 'pg' line in your Gemfile in a group called production, then bundle install --without production locally.
More up-to-date info: It had something to do with a different version of pg gem locally.
I already had pg in a production group (I run sqllite locally), but Heroku was still puking.
The problem went away for my new Rails 3.1 app when I:
rm Gemfile.lock
touch Gemfile
bundle install
git add .
git commit -am "wiped Gemfile.lock re-ran bundle install"
git push heroku master
worked like a charm when I then ran heroku run rake db:migrate