I am trying to create new project using rails but it display error. I am working on mac and its display error.
$rails new EMS
/Users/.rvm/gems/ruby-2.2.0/bin/rails:23:in `load': cannot load such file -- /Users/.rvm/gems/ruby-2.2.0/gems/rails-4.2.0/bin/rails (LoadError)
from /Users/.rvm/gems/ruby-2.2.0/bin/rails:23:in `<main>'
from /Users/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
One day i also faced same issue when i was trying to create new rails application. So followed these below steps and it was soled,
Uninstall the rails
Uninstall the ruby
Again install the latest version of ruby using rvm
than install the rails using command gem install rails
After following these step, now i am able to create new app. May be this also help you to solve this error.
If you are using windows OS as your development environment then please see this link : "certificate verify failed" error when installing Ruby gems on Windows
And I would recommend you to use : http://railsinstaller.org/en
By the way , Brother , Rails would behave perfect with Linux based platform .
And for mac os please take a look at : https://rvm.io/rvm/install
This will help you to have multiple ruby version and to switch between them ... to use full power of ruby and gems.
Related
I have sensu server and sensu-client Installed on one machine (centos) and installed the the plugins through gem.
Everything was good when I run the check_ping.rb from the command line, but When I configure the same check in /etc/sensu/conf.d/ and check in the UI I am getting this ruby issue;
gem install sensu-plugins-network-checks
I have ruby installed of 1.9.3 version
and configured EMBEDDED_RUBY=true
when I check the UI the below is the error I am facing
/opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- net/ping (LoadError)
from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/sensu-plugins-network-checks-0.2.4/bin/check-ping.rb:31:in `<main>'
Sensu::Plugin::CLI: ["Not implemented! You should override Sensu::Plugin::CLI#run."]
Can someone help with this?
It is a common issue that Gems get installed but not to the embedded ruby which you are using.
what you want to do is /opt/sensu/embedded/bin/gem install net/ping
so it is in the right place.
The alternative option for this would be to edit /etc/default/sensu file and change embedded ruby to false then it would use your regular ruby and the corresponding gems.
I am new to rails and have finally been able to install rails and follow along with a video tutorial. I am having a couple issues. Yesterday I was not having any major issues. Then this morning when I tried to create another rails project I get an error or when I try to run my rails server for my last first project I get an error. Any help would be greatly appreciated. Thank you!
/Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/rails:23:in `load': cannot load such file -- /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/gems/rails-4.2.3/bin/rails (LoadError)
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/rails:23:in `<main>'
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `eval'
from /Users/lipmanb/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in `<main>'.
It looks like you don't have Rails installed on that environment. You may have installed Rails system wide, but since you are using RVM and you are within a Rails folder, you may be missing that specific Rails version.
Run bundler from within the Rails folder and install the required version.
$ bundler install
or simply
$ bundler
Navigate to your root directory cd ~ and type the following:
sudo gem install rails
Please do not just close
I've recently started learning rails and am having trouble with the rails server command when i run it i get the following error message:
C:/Ruby200/lib/ruby/2.0.0/gems/sqlite3-1.3.7-x86-mingw32/lib/sqlite3.rb:in 'require' cannot load such file -- sqlite3/sqlite3_native (LoadError)
this is followed by 16 from messages (I will add them if asked).
My system is Windows XP, Ruby version 2.0.0p195, Rails Version 4.0.0.
I will gladly provide further info upon request.
All the solutions I've found i have tried and it has not worked.
Solutions I've tried:
1) Knapsack solution
2) ruby setup.rb config -- --with-sqlite-include=c:\sqlite-autoconf-3071700
3) ive tried the sqlite-amalgamation download.
4) uninstalling and reinstalling sqlite3, ruby, rails, rubygems, dev tools, etc.
5) running virtual machine with ubuntu 13.04 (rails server command is working as if i said rails new server)
6) and several other command line runs and various downloads.
Its told me many times that its installed sqlite3 version 1.3.7, but I still get the same result.
Please and thank you for your help in advance!!
P.S. Many of the others are based on windows 7 or higher and older versions of ruby and/or rails.
I recently upgraded to Lion and I am trying to install Rails. I used RubyGems to install rails and each time I tried to start a new rails project I would get an error saying, "Method 'list ' was not found".
So I unistalled Rails using RubyGems. I noticed I had two versions installed. I uninstalled both. I then ran 'gem clean'. Once again I installed Rails but now when I attempt to create a new rails application it's as if rails is not installed.
rails: command not found
I have the new Xcode command line tools installed. Can anyone help a brother out?
I believe my issue is due to the fact RubyGem does not add 'rails' to the $PATH environment variable. I was able to get everything working by installing RVM and using it to update my default Ruby and install Rails
Got a new machine and ported settings and files over. Went to update to Rails 3.2 and now I'm getting a list of installed gems when I run "gem list" but when I run the rails command, it tells me: Rails isn't installed.
I'm running OS X Lion and Rails 3.2. I've tried editing the path and creating a symlink and nothing seems to work. I'd be grateful for any help!
Try this tutorial and install Ruby Version Manager. It's got all the steps I followed to get ruby working on my mac.
http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/