I'm trying to deploy Zipsell with heroku. However when I run through the heroku and ruby setup and try to deploy via:
git clone https://github.com/yongfook/zipsell
cd zipsell
./bin/setup
I get the error message:
An error occurred while installing pg (1.0.0), and Bundler cannot continue.
Make sure that gem install pg -v '1.0.0' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile:
pg
I have run through the setup process now multiple times and reinstalled all but still am not able to deploy. Any idea what is going wrong?
From the repo you posted it seems the error message is very clear. From the Gemfile of the repo you shared it seems you haven't install pg which is the postgresql (You will need to remove sqlite.
The problem is that there are some missing dependencies that you don't have installed and that why the error is thrown. There is the concepts of gems which is packaged code. https://rubygems.org/ via the following website you can find some of the gems you'r missing. There is also the versions which have to be compatible.
What you'll do is search for the missing gems shown in the error message. Check for the correct version if you the gem in your Gemfile but the version is conflicting.
https://github.com/yongfook/zipsell/blob/master/Gemfile
bundle update
install the missing gems
gem install pg
and so on. Or do it straight in the Gemfile.
showing below error
C:\Ruby21>gem update
Updating installed gems
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certif
icate verify failed (https://api.rubygems.org/specs.4.8.gz)
C:\Ruby21>
May be blocked by windows firewall.
Here's the fix to your problem.
I only had to follow these instructions.
Installing using update packages (NEW)
Now that RubyGems 1.8.x, 2.0.x, and 2.2.x have been released, you can manually
update to those versions.
First, download the proper version of RubyGems for your installation (e.g. if running version 1.8.28, download 1.8.30).
Note: To find the version of RubyGems you're using, run gem --version in the command line.
You can find download links at GitHub under
Releases.
Now, locate rubygems-update-X.Y.Z.gem where X.Y.Z will be the matching version of RubyGems that you need to update:
Running 1.8.x: download 1.8.30
Running 2.0.x: donwload 2.0.15
Running 2.2.x: download 2.2.3
Please download the file in a directory that you can later point to (e.g. the
root of your harddrive C:\)
Now, using your Command Prompt:
C:\>gem install --local
C:\rubygems-update-1.8.30.gem
C:\>update_rubygems --no-ri --no-rdoc
After this, gem --version should report the new update version.
You can now safely uninstall rubygems-update gem:
C:\>gem uninstall rubygems-update -x
Removing update_rubygems
Successfully uninstalled rubygems-update-2.2.3
After following these instructions, I was able to run gem update --system successfully.
I didn't have to implement the following set of instructions.
I think I was running gem version 2.4.4.
am trying to install sass after installing ruby, but iam getting following error, please help me to fix this
maradhak#WW730VW7X1688 /c/softwares
$ gem -v
2.2.2
maradhak#WW730VW7X1688 /c/softwares
$ gem install sass
ERROR: Could not find a valid gem 'sass' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://rubygems.org/latest_specs.4.8.gz)
The error has something to do with being vulnerable to the Poodle SSL bug, it will not be verified for that reason. If there's a way to upgrade to a better certificate, but at the time of writing this answer, I could not find the upgraded certificate.
I used the non-SSL host instead, altough I should note that this is not the best nor a permanent solution, it lacks security.
The command used:
gem source -a http://rubygems.org/
A discussion about this subject can be found here: https://github.com/rubygems/rubygems/issues/515#issuecomment-65326585
Update: There seems to be a permanent solution now, which replaces the certificate with a proper protected one. It can be found on the following URL, an tutorial is included in that page.
https://gist.github.com/luislavena/f064211759ee0f806c88#installing-using-update-packages-new
Short answer:
gem sources -a http://rubygems.org/
Confirm than you don't really care about that specific warning, since you trust rubygems.org. Then:
gem install sass
And it works.
thanks for your suggestions, as you guys said this seems to be SSH update issue.
have solved this issue simply down graded my RUBY version from "2.1.5" to "1.8", and the gem version is "1.8.29".
then i was able to install SASS
Following worked for me:
Remove the https source temporary, run gem update --system and then switch back to https.
gem sources --remove https://rubygems.org/
gem sources --add http://rubygems.org
gem update --system
gem sources --remove http://rubygems.org
gem sources --add https://rubygems.org
Ref: https://github.com/rubygems/rubygems/issues/1736
I also encountered the same problem today。
Running gem install sass returned
ERROR: Could not find a valid gem 'sass' (>= 0), here is why:Unable to download data from https://rubygems.org/ -SSL_connect returned=1 errno=0 state=SSLv3read server certificate B: certificate verify failed(https://api.rubygems.org/specs.4.8.gz)
Then I find a way to fix it:
gem sources -a http://rubygems.org/
gem install sass
Adding http://rubygems.org/ to sources solves this.
Here is a capture of my terminal
For me it was a proxy issue. When I appended the proxy details to the gem install command it worked.
gem install sass --http-proxy=http://<yourproxy>:<port>
The first step to Rubygems(http://rubygems.org/) then download sass on(http://rubygems.org/gems/sass)
put in: npm install
You don't need to disable SSH or downgrade your ruby version, you can simply install the SASS gem manually. Here's how to do it:
On windows, first install the Ruby installer for windows.
Download the latest version of the gem from here:
https://rubygems.org/gems/sass Click the latest version, and then on
the right side of the screen (in Links section) click the "Download"
link to download the original gem file (sass-*.*.*.gem)
Now paste the downloaded gem file to the directory that ruby is
installed on: C:\Ruby22-x64\bin\sass-*.*.*.gem
In Command Prompt run the following commands:
cd C:Ruby22-x64/bin
gem install sass-*.*.*.gem1
NOTE: You may also need to call the local flag while installing the gem: gem install --local C:Ruby22-x64/bin/sass-*.*.*.gem
Install a full fledged Cygwin on your windows, the ssh support is good in it. You should be able to install it without any extra efforts, well I always do. In fact once you have Cygwin install you would hardly use the command prompt.
I'm totally new to Ruby and Sass. I didn't want to risk security and I'm on a Windows machine. I had already installed latest ruby, but kept getting the same error message as the OP when trying to run gem install sass at the command prompt.
Here's what solved the problem for me.
Go to: https://rubygems.org/pages/download and follow the instructions on the page starting here (for manual installation):
If you don't have any RubyGems installed, there is still the pre-gem approach to getting software, doing it manually:
Download from above (URL above)
Unpack/unzip into a directory and cd there (into the directory you unzipped it)
Install with: ruby setup.rb (at the command line type that command. You may need admin/root privilege)
After I installed ruby gems, I opened Ruby command prompt (using Start Command Prompt with Ruby from the start menu) and ran the command gem install sass and it worked:
C:\Users\chris>gem install sass
Fetching: sass-3.4.22.gem (100%)
Successfully installed sass-3.4.22
Parsing documentation for sass-3.4.22
Installing ri documentation for sass-3.4.22
Done installing documentation for sass after 36 seconds
1 gem installed
Wanted to detail it as much as possible for other newbies like me. Hope this helps someone.
Changing from http to https makes your computer vulnerable to hackers
I explain some solutions in my answer here: https://stackoverflow.com/a/40075753/845413
If you found this error by searching and are using RVM on OSX just run.
rvm osx-ssl-certs update all
Bundler outlines a few other solutions in their troubleshooting guide for this error: http://bundler.io/v1.16/guides/rubygems_tls_ssl_troubleshooting_guide.html#troubleshooting-certificate-errors
and include...
gem install bundler
gem update --system
Finally, you can simply reinstall RVM or rubygems manually.
Manually install Ruby gems: https://rubygems.org/pages/download
Manually install RVM (recommended): http://rvm.io/
I am trying to run 'gem specific_install' (https://github.com/rdp/specific_install) to install another gem from a Github repository:
sudo gem specific_install https://github.com/RemoteRepository/foo_gem.git
After being prompted for my Github Username and password, I am able to download the gem. However, I get the following error:
ERROR: While executing gem ... (NoMethodError)
undefined method `build' for Gem::Package:Module
Apparently, other people have the same error based on a comment to a specific_install related answer to this question: How to install gem from GitHub source?
How can this error be resolved?
According to this issue this is due to an outdated version of gem (rubygems).
Updating gem should fix it, if you are using rvm you should run rvm rubygems current (this worked for me), if you are not using rvm I believe you should follow How to upgrade rubygems.
I pushed a gem up to rubygems.org, and when I do a 'gem install (gem)' I get this error:
ERROR: While executing gem ... (NameError)
uninitialized constant Psych::Syck
I can do a 'gem build (gem).gemspec' to generate a local gem and then gem install (gem).gem and that installs fine. I can also put the gem into my Rails' app's Gemfile with a pointer to the Github repo and that will also work. I have tried installing the gem (from rubygems.org on multiple computers and they all get the same error.
I am out of ideas as to what can be causing the install to fail when done from rubygems.org but not when I generate it locally. I am using Jeweler to push the gem up to rubygems.org.
The specific error I got was: uninitialized constant Psych::Syck (NameError) when doing bundle install.
This happened when installing simplecov (awesome code coverage tool) version 0.5.0. Working in Ubuntu 11.04 and using RVM.
Fixed the issue with gem update --system
This updates rubygems and produced the following output:
Updating rubygems-update
Fetching: rubygems-update-1.8.10.gem (100%)
Successfully installed rubygems-update-1.8.10
Installing RubyGems 1.8.10
RubyGems 1.8.10 installed
== 1.8.10 / 2011-08-25
RubyGems 1.8.10 contains a security fix that prevents malicious gems from
executing code when their specification is loaded. See
https://github.com/rubygems/rubygems/pull/165 for details.
* 5 bug fixes:
* RubyGems escapes strings in ruby-format specs using #dump instead of #to_s
and %q to prevent code injection. Issue #165 by Postmodern
* RubyGems attempt to activate the psych gem now to obtain bugfixes from
psych.
* Gem.dir has been restored to the front of Gem.path. Fixes remaining
problem with Issue #115
* Fixed Syck DefaultKey infecting ruby-format specifications.
* `gem uninstall a b` no longer stops if gem "a" is not installed.
------------------------------------------------------------------------------
RubyGems installed the following executables:
/home/baller/.rvm/rubies/ruby-1.9.2-p180/bin/gem
RubyGems system software updated
Seems to be a problem with Syck. See here:
Rails 3.1 on Ubuntu 11.04 via RVM - uninitialized constant Psych::Syck
Here:
http://rubyforge.org/tracker/?group_id=126&atid=575&func=detail&aid=29163
And fixes suggested here:
https://github.com/rubygems/rubygems/pull/57
The solution would be to run the below command in your terminal:
gem update --system
It is a bug in the system gem version that causes this issue. This worked for me.