I recently updated to rails 4.1.6 and ruby 2.1.3p242. I also updated all gems on my system. After creating a new app, I keep getting a pg_ext load file error on running the server. I'm on windows 8 x64 with PostgreSQL 9.3. The pg gem was working fine under my previous RoR installation which was rails 3.2 and ruby 1.9.3.
Under the gem's installation directory, I've a 2.0/pg_ext.so file. I tried renaming the folder to 2.1 and ran the server. The result was the same. I assume it's cause Ruby doesn't allow to Require a .so file. Below is the screenshot of the error:
Any help would be really appreciated. Thanks!
Posted question on the official Gem page:
https://bitbucket.org/ged/ruby-pg/issue/192/pg_ext-load-error
As per the suggestion, I installed the pre-version of the next release. That gave me another error which was solved using:
https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors
TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows
Posting the answer to help people facing similar problems in the future.
1) In the command line enter:
gem install pg --pre
gem list pg
2) In the Gemfile set the gem to the newly installed version:
gem 'pg', '~> 0.18.2'
Related
Hi I'm new to Ruby on rails and doing the tutorial on railstutorial.org, I'm stuck on the the first chapter about bundler install.I updated my gem file to what version I want them on but when I go to hello_app directory and type bundle install in in my shell I get a "couldn't find gem file". I type LS or ls in the hello_app directory and gemfile.rb shows up. what am i doing wrong? Ive done a search on this topic for 2 hours I have not found a solution. I have rails 4.2.1 installed but i also installed 4.2.0 because the book calls for this version, don't know if thats the cause.
If you installed rails correctly before creating a new rails app, I'm not sure you'll even need to update your gems with the bundle install
I found out what was wrong. I had saved the Gemfile in a .rb extension thinking it was suppose to be a ruby file. thats why it couldn't find the Gemfile. how I found out was just restarting the rails project from the beginning and do it step by step. I found the original Gemfile didn't have the .rb file extension, so when I tried bundle install it worked. thank for the reply #Mba Uchenna.
A very strange thing has happended to my app recently and not sure what has changed? wicked pdf is not longer displaying my https:// images from my amazon s3 server. I am using the images with the src= "https://pathtoimage.png" and they were displaying just find before.
The displaying of images is not working locally or on heroku. On my production server, the pdf rendering is not working as well and creating a bunch of blank white pages.
I am using the gem
gem 'wkhtmltopdf-binary'
gem 'wicked_pdf'
This is the fork of the wkmtltopdf-binary that worked for me: https://github.com/pallymore/wkhtmltopdf-binary.
Insert the following lines in your Gemfile:
gem 'wkhtmltopdf-binary-edge', '~> 0.12.2.1'
Last 2 days i am facing the same problem. I have the version of wkhtmltopdf is 0.9.6. I have upgraded the version to 0.9.9. Now it's works fine.
I feel amazon might change something.
It seems that the version of wkhtmltopdf that comes bundled with the wkhtmltopdf-binary, 0.9.9 has this problem. Uninstalling the gem and then installing a newer binary such as 0.12.2.1 solved this issue for me.
I'm on OS X so I installed it with homebrew but there are binaries for other systems on wkhtmltopdf.org
Here's how to install a newer version of wkhtmltopdf with homebrew:
brew install cask
brew cask install wkhtmltopdf
The passenger reports error that the gem json cannot be found. While other gems can be found because they are installed by bundle install. However, json was default installation by ruby 2.1.1.
And it is wired that bundle shows json has been deleted.
$ bundle show json
The gem json has been deleted. It was installed at:
/home/canoe/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/json-1.8.1
But gem can still find it on system.
$ gem list json
json (1.8.1)
And json is installed at this location /home/canoe/.rbenv/versions/2.1.1/lib/ruby/2.1.0/json.rb.
I don't use cap while deploying the rails4.1 application, so this solution doesn't work for me.
I don't want to package everything into somewhere, instead to use all current installed gems in the gemsets.
So, how to make bundle use system default gems in nginx passenger?
I encountered the same issue, but following post helped me: fusion passenger issue with json gem when running on nginx
Maybe you are also using some ruby version control tool. As I'm using RVM.
According to the comment in above post. passenger_ruby need to be pointed to the RVM wrapper folder.
eg:
passenger_ruby /usr/local/rvm/wrappers/ruby-2.0.0-p481/ruby;
Opened up a Rails project I haven't coded in a while and I just tried starting up the Rails server with:
`rails s`
and I get this error message:
.rvm/gems/ruby-2.0.0-p195#global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find i18n-0.6.4 in any of the sources (Bundler::GemNotFound)
Fwiw, I've done a bundle install and here's what I get when I check i18n:
$ gem list i18n
*** LOCAL GEMS ***
i18n (0.6.5)
Any idea what the problem is and how it should be fixed?
In case your rails gem is in the Gemfile, you should run
bundle exec rails s
instead. HTH.
There may be an issue with how you installed RVM.
Try calling gem list and see if it's mentioned anywhere there.
There's a Rails guide to internationalization API. It may contain useful information if reintalling RVM doesn't fix anything
http://guides.rubyonrails.org/i18n.html
I started a rails 4 project and added the following gem (supposedly, it has rails 4 support)
gem 'compass-rails', '~> 2.0.alpha.0'
However, after bundle install and $ bundle exec compass init I keep getting
No application integration exists for rails.
Anyone knows why ?
Thanks,
I get the same error with compass-rails v1.1.3 and rails 4, when running "bundle exec compass init rails", but when I run "bundle exec compass init" (omitting "rails") it works fine for me. The version of compass-rails you are using has been yanked since last July (see here: http://rubygems.org/gems/compass-rails/versions/2.0.alpha.0).
Remove project_type = :rails from your config file.