Upon trying to start a new Rails App on Linux, I am receiving this error:
I am a newbie to this software. Please help!
Thanks :)
My Error
UPDATE: I ran 'sudo gem install bundler', and it worked but now received this error!
'/usr/bin/ruby2.3: No such file or directory -- /usr/bin/bundle (LoadError)'
My new error
It seems like you dont have bundler gem installed.
Try:
gem install bundler
Bundler is missing.
Try the below commands.
[sudo] gem install bundler
bundle install
Try stop using sudo in your commands. According to your new capture, you are using sudo with gem install bundler, and maybe that is conflicting with your configuration.
Take this link for reference for sudo usage with gem
https://stackoverflow.com/a/2119413/4870465
Related
how's going?
I trying to create my first application with Ruby on Rails, I can create the project but I can't run the server.
My OS is Windows.
I installed Node, Yarn, Ruby, Rails, Sqlite3.
This message appears when I try to run "rails s"
Could not find gem 'sqlite3' in locally installed gems.
Run `bundle install` to install missing gems.
I run the command "bundle install", "bundle update" and doesn't work. This message appears when I run "bundle install":
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
In Gemfile:
sqlite3
When I verify the version of sqlite3:
enter image description here
I tried editing Gemfile:
gem 'sqlite3', '~> 1.4.2'
And tried install this way:
gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'
I tried this steps too:
https://www.youtube.com/watch?v=cAseoJeNG8I
I follow the recommendation in the documentation for windows users and run "bin/rails s" on Bash, but still the same problem.
I read other answers here to similar questions but did not help me, for this I ask with this.
If something was a miss to you understand the problem please tell me and I provide the information.
Thanks, everyone.
The above Error occurred because sqlite3 is not installed on your system.
Step1:- First, install the sqlite3 on your system by following the steps mention here
Step2:- Run bundle install
Have you tried deleting gemfile.lock? Try delete and after that again type bundle install
I'm getting an error while running bundle install on digitalocean. I've put the error's in a pastebin here;
http://pastebin.com/wzFCFYYE
Thank you.
Looks similar to Bundle install: ERROR: Failed to build gem native extension. nio4r gem
You probably don't have installed on DigitalOcean some libraries... from the marked as correct answer... probably you need only
sudo apt-get install libev-dev
Before install the gem
Lets try
`sudo gem install nio4r -v '1.2.1'`
Might be this command will help you -
gem install nio4r -v '1.2.1'
if this command is not working then follow the below steps to fixing this issue like -
Try to install nio4r with different version so remove/change version from Gem file. If still getting some issue then remove Gemlock file and run bundle install.
Might be above solution will help you.
I have tried everything from source installations, homebrew, and manually restoring the pg_config file as sudo user. I am out of ideas on this... here is what I get:
gem install pg -v '0.12.1'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/Toran1/.rvm/gems/ruby-1.9.2-head/gems/pg-0.12.1/.gemtest
any help would be appreciated :).
Probably you ran sudo gem install pg to install pg, so the installed gem still has root permission. Run sudo chown -R Toran1 /Users/Toran1/.rvm to fix up the permission first. Then you should be able to run gem install pg
Manual gem installations like this can be installed with sudo.
sudo gem install pg -v '0.12.1'
Hope this helps!
EDIT:
As per the comments below, I noticed you are using rvm. Don't use sudo when using rvm. Check the paths and make sure that you do indeed have the correct permissions set!
use this:
RVMSUDO gem install pg
hiii
i am trying to update my gem file. Current version of gem is 1.8.5
When i am trying to update it using command " gem install rubygems-update -v 1.8.5 " it is giving following error
**
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: Name or service not known
(http://rubygems.org/gems/rubygems-update-1.8.5.gem)
**
I am working on ubuntu 10.04
also i tried to update using command " gem update --system "
it is giving the error as below
Updating rubygems-update
**
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find a valid gem 'rubygems-update' (1.8.6) locally or in
a repository
**
i also tried the solution given on the link http://lightyearsoftware.com/2009/07/updating-rubygems-to-recent-1-3-x/
please help me to resolve the problem..
If you are under Windows 7, run the command prompt as Administrator.
Read this thread. The error reported is the same of yours.
Try to apply the Google DNS configuration to your connection.
Otherwise you can try to install locally the gem, downloading it on rubygems.org. After this, in the directory you downloaded the gem, try to install it locally with the command: gem install gem_name --local
I also had this error. I resolved it with
gem uninstall rubygems-update
(you may need to be sudo) and then reinstalled with
gem install rubygems-update
now it's working fine, hope this is helpful
Try this:
Manually uninstall the gem you want to remove: gem uninstall [gemToUinistall]
Download the gem manually from http://rubygems.org/
try to install the gem from local : gem install [gemToInstall]
I'm following these instructions to set up Ruby on Rails on my Ubuntu machine. For now at least, I'm planning to use Mongrel.
When I get to this step:
sudo gem install rails
...I get this message:
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: could not find rails locally or in a repository
What should I do next?
I would try to update gems first. The latest version is 1.3.3. You can do this on Ubuntu by either:
sudo gem install rubygems-update
sudo update_rubygems
or
sudo gem install rubygems-update
cd /var/lib/gems/1.8/gems/rubygems-update-*
sudo ruby setup.rb
basically, try again!
It could be a serious error, but in earlier versions ( I encountered this about 1 year ago or so ) it happend on the first try and when trying again the gem would eventually be found. I think it had something to do with the servers performance or such.
Using a recent version of rubygems is probably a good idea, and if it really won't work you can always get the .gem file from sourceforge directly and install from it.
For example with the file rails-2.3.2.gem:
gem install rails-2.3.2 –local
gem install rails --source http://gems.rubyonrails.org