I am trying install devkit on windows 7 but getting below error while issuing command
ruby dk.rb install.
[INFO] Skipping existing gem override for 'C:/RailsInstaller/Ruby1.9.3'
[WARN] Skipping existing DevKit helper library for 'C:/RailsInstaller/Ruby1.9.3'
So i tried >ruby dk.rb install --force but now i am getting this error,
[WARN] Updating (with backup) existing gem override for 'C:/RailsInstaller/Ruby1
.9.3'
[WARN] Updating (with backup) DevKit helper library for 'C:/RailsInstaller/Ruby1
.9.3'
I have installed ruby using rails installer.
This is the content in my config.yml file,
# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- C:\RailsInstaller\Ruby1.9.3
Is just a warning, ignore it, don't --force it, use Ruby and live long and prosper.
Related
I've installed Ruby and Rails, and for the most part it's installed. However, when I try to create an app to see if all the installations work, the rails server won't run. It goes something like this:
I created a new rails app file, it's shown in my C: directory so that's a success
but the last line at the installation said this:
bundle install
The latest bundler is 2.3.10, but you are currently running 1.15.3.
To update, run `gem install bundler`
Fetching source index from https://rubygems.org/"
I tried the
gem install bundler
next, but I got this error message:
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
also when I tried,
rails s
I got this result:
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
[--skip-yarn], [--no-skip-yarn] # Don't use Yarn for managing JavaScript dependencies
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
-G, [--skip-git], [--no-skip-git] # Skip .gitignore file
[--skip-keeps], [--no-skip-keeps] # Skip source control .keep files
-M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files
-O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files
-P, [--skip-puma], [--no-skip-puma] # Skip Puma related files
-C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files
-S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files
[--skip-spring], [--no-skip-spring] # Don't install Spring application preloader
[--skip-listen], [--no-skip-listen] # Don't generate configuration that depends on the listen gem
[--skip-coffee], [--no-skip-coffee] # Don't use CoffeeScript
-J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files
[--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem
-T, [--skip-test], [--no-skip-test] # Skip test files
[--skip-system-test], [--no-skip-system-test] # Skip system test files
[--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout
[--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository
[--rc=RC] # Path to file containing extra configuration options for rails command
[--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file
[--api], [--no-api] # Preconfigure smaller stack for API only apps
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
[--webpack=WEBPACK] # Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular)
Runtime options:
-f, [--force] # Overwrite files that already exist
-p, [--pretend], [--no-pretend] # Run but do not make any changes
-q, [--quiet], [--no-quiet] # Suppress status output
-s, [--skip], [--no-skip] # Skip files that already exist
Rails options:
-h, [--help], [--no-help] # Show this help message and quit
-v, [--version], [--no-version] # Show Rails version number and quit
Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.
You can specify extra command-line arguments to be used every time
'rails new' runs in the .railsrc configuration file in your home directory.
Note that the arguments specified in the .railsrc file don't affect the
defaults values shown above in this help message.
Example:rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
I have tried to install bundler, update bundler, update system... none of that worked. I've also tried the cacert.pem file for certification (according to one of the tutorial articles I found), but it's still doesn't work.
I'm using Windows 10, ruby 2.3.3p222 and Rails 5.1.3. With this, do I need to reinstall Ruby and Rails? Is there something missing in my installation?
I don't have directories such as Ruby200 and Ruby 64. I'd installed them a few months ago. But I deleted them all.
Now I'm trying to install ruby v2.2.6(86) and use devkit. But there are some errors like "Skipping invalid directory" What do I have to do?
C:\Ruby22\devkit>ruby dk.rb init
[INFO] found RubyInstaller v2.0.0 at C:/Ruby200
[INFO] found RubyInstaller v2.2.6 at C:/Ruby22
[INFO] found RubyInstaller v2.3.3 at C:/Ruby64
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
C:\Ruby22\devkit>ruby dk.rb install -f
[ERROR] Skipping invalid directory 'C:/Ruby200'
[WARN] Updating (with backup) existing gem override for 'C:/Ruby22'
[WARN] Updating (with backup) DevKit helper library for 'C:/Ruby22'
[ERROR] Skipping invalid directory 'C:/Ruby64'
it also makes problem
C:\Ruby22\devkit>ruby dk.rb install
[ERROR] Skipping invalid directory 'C:/Ruby200'
[INFO] Updating convenience notice gem override for 'C:/Ruby22'
[INFO] Installing 'C:/Ruby22/lib/ruby/site_ruby/devkit.rb'
[ERROR] Skipping invalid directory 'C:/Ruby64'
The DevKit script looks at some Registry Keys that were set during a RubyInstaller installation.
When you removed the other Ruby installations you just deleted them instead of using the uninstaller that came with RubyInstaller. That left the Registry Keys as dangling pointing at deleted registrations.
A registry cleanup tool might be able to pick them and fix it for you, if not you may have to manually clean it up yourself.
I am trying to modify an existing Fluentd plugin and use it with my customization. So I :
git cloned the plugin repo from github. git clone <url>
Edited my changes
gem build plugin.gemspec
gem install plugin.gem
Created a config mentioning the type of plugin
Ran fluentd -c <fluend_conf.conf> -vv
And I ended up getting this in fluentd log(fluent-plugin-swift is the plugin I edited and the type of the plugin is 'swift'):
2017-03-22 15:00:27 +0000 [info]: fluent/engine.rb:126:block in configure:
gem 'fluent-plugin-swift' version '0.0.1'
2017-03-22 15:00:27 +0000 [error]: fluent/supervisor.rb:369:rescue in
main_process: config error file="fluend_conf.conf" error="Unknown output plugin
'swift'. Run 'gem search -rd fluent-plugin' to find plugins"
EDIT-1: For clarifications
I have also checked the naming convention of the plugin that is to be registered.
The plugin is present in <base_dir>/lib/fluent/plugin/.
Also the name of file is out_swift.rb. And finally
inside the file, the plugin gets registered as:
Fluent::Plugin.register_output('swift', self)
Also is there any way, I can check the list of registered plugins, and the name it uses to get registered to fluend?
NOTE:
The same had previously worked for me, I had to re-do this as someone had formatted the machine I had my changes.
Please let me what is wrong in my approach?
The problem could be with the installation path, Please check the following, :
Type gem environment
You will get to see the INSTALLATION DIRECTORY like:
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.8
- RUBY VERSION: 2.4.0 (2016-12-24 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.4.0
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.4.0
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
Go inside the INSTALLATION DIRECTORY directory, now do
cd gem/<ur_custom_plugin>
Now check whether, your files are there or not.
If not, you got your answer.
SOLUTION:
Simply copy your files to this directory and start fluentd
As the above mentioned, this may related to which gem you used to install the plugin, for my case in CentOS7, the td-agent-gem as below works:
td-agent-gem install <pluginname>
install ruby development environment
brew install rbenv
now run fluentD from ruby environment
~/.rbenv/shims/fluentd
this refers /etc/fluent/fluent.conf
Installing the plugin from ruby environment
~/.rbenv/shims/gem install fluent-plugin-rewrite-tag-filter
I have got this error when running bundle install
Gem::InstallError: The 'puma' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
I'm using RailsInstaller which already has DevKit.
I didn't have this problem before but I seem to get it after I changes the ruby version from 2.2.4 to 2.2.5. I'm using a windows computer. Any idea how to solve this issue?
I solved the problem by following these instruction:
download devkit from here.
Install the file in DevKit folder
open cmd and navigate to the folder
Copy the path of the ruby folder you installed in C drive and paste it in the DevKit\config.yml. Change ‘/’ in the path to ‘\’.
It should look like this:
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- C:\Ruby22
Run ruby dk.rb install
Back to your rails folder, run bundle install and you should not have any errors
I'm trying to install the Ruby Development Kit from http://rubyinstaller.org/downloads but I run into some problems at the command prompt.
After running C:\Ruby\DevKit>ruby dk.rb init I got the following success response:
[INFO] found RubyInstaller v2.0.0 at C:/Ruby/Ruby200-x64
Initialization complete! Please review and modify the auto-generated 'config.yml' file to ensure it contains the root directories to all of the installed Rubies when you run 'ruby dk.rb install'.
Then I ran C:\Ruby\DevKit>ruby dk.rb review and got this success response:
Based upon the settngs in the 'config.yml' file generated from running 'ruby dk.rb init' and any of your customizations, DevKit functionality will be injected into the following Rubies when you run 'ruby dk.rb install'.
C:/Ruby/Ruby200-x64
Finally, I ran the C:\DevKit>ruby dk.rb install line, as it seems everything was working fine up until this point. Unfortunately, I keep getting this message:
[ERROR] Skipping invalid directory 'C:/Ruby/Ruby200-x64'
I don't know what to do! Thanks kindly for the help.
I had the same error. As mentioned by TSG, config.yml had wrong path for ruby. For example, mine installed it to c:\Ruby200x64 but the config.yml had it as c:\Ruby200-x64 .
config.yml takes it from path variables of windows. If you use windows, I suggest you to update your path environment variables as well.. both user variables and system variables..
Looks like you changed the name of your Ruby directory from Ruby200-x64 to Ruby. In your DevKit folder, open the file "config.yml" and change the last line to reflect the proper folder name of your Ruby install.