Trying to install Ruby alongside a Wamp Server so I can program in Rails. When I "gem install rails" in CMD, I get the following error:
C:/wamp/ruby/lib/ruby/1.9.1/rubygems/package.rb:10:in 'require': 126: The specified module could not be found. - C:/wamp/ruby/lib/ruby/1.9.1/i386-mswin32/zlib.so (Load Error)
I've checked and the zlib.so is definitely there. Where have I gone wrong?
You probably need the zlib DLL file. You can download it from here and copy it into the same folder as that zlib.so file as zlib.dll. It may be called zlib1.dll in the download, and there may already be a zlib1.dll on your machine that you need to rename to zlib.dll
Related
I am using windows 10. I install Rails and other supporting software via railsinstaller.org website.
Now I go on CMD and writing command rails server but Rails server not starting work. when I open link in firefox http://localhost:3000
Following is snapshot of output when I write rails s in cmd. I have Rails 4.2.5.1 in my PC and using Windows 10
The problem my be caused due to following (Unable to Install gems)
if you are using latest version of ruby installer to install ruby then there are problem for installing nokogiri and ulifier or other gem which needs to compailing in your pc. so you needs to install devkit first. For this please do following:
The download is a self-extracting archive. When you execute the file, it’ll ask you for a destination for the files. Enter a path that has no spaces in it. We recommend something simple, like C:\RubyDevKit\. Click Extract and wait until the process is finished.
Download from here
Next, you need to initialize the DevKit and bind it to your Ruby installation. Open your favorite command line tool and navigate to the folder you extracted the DevKit into.
cd C:\RubyDevKit
Auto-detect Ruby installations and add them to a configuration file for the next step.
ruby dk.rb init
Install the DevKit, binding it to your Ruby installation.
ruby dk.rb install
Now run bundle install
If still problem persist downgrade your ruby or install linux distro.
You need to change your directory to the app root folder.For Example if your app name is 'myapp', then type cd myapp and run rails server with rails s.
Check if the bin/rails file is in place. If not, generate a new sample app, then copy the bin folder to it.
simply add gem "tzinfo-data" to your Gemfile and run bundle install and you are good to goenter image description here
I dont have any idea about Ruby, due to requirement I have to install and configure Ruby. I have made some silly mistake but not able to resolve. Please what can be done to remove following error.
/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in ``require': cannot load such file -- ec2/amitools/version
Use this command to install the redis database
sudo gem install redis
Because it is required.
Make sure you set both the EC2_AMITOOL_HOME variable as well as the PATH variable. If you do not add the EC2_AMITOOL_HOME directory to your path then you will get this error.
export EC2_AMITOOL_HOME=/opt/aws/amitools/ec2-1.4.0.9
export PATH=$EC2_AMITOOL_HOME/bin:$PATH
New to Ruby on Rails. Working in Windows XP.
I have installed the rails installer from railsinstaller dot org
Working through the example from guides dot rubyonrails dot org / getting_started
Issued the command 'rails new blog'
the bundle install fails on Network error while fetching https://rubygems.org/quick/Marshal.4.8/sqlite3-1.3.6.gemspec.rz
I have downloaded the sqlite3-1.3.6 gem and tried to manually install, receiving the following error:
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
* extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
I've read many different websites that tell me to make sure Sqlite3.dll is in the system path, so I've downloaded the latest Sqlite3.dll (from sqlite3 dot org, using the windows precompiled binaries) and placed them within the path, even overwriting the Sqlite3.dll file within c:\Railsinstall\Ruby1.9.3\bin but all to no avail. I've even tried registering Sqlite3.dll using regsrv32 Sqlite3.dll, only to receive the message "Sqlite3.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered"
I have successfully been able to install Sqlite3-1.3.6-x86-mingw32.gem, however 'rails new blog' still looks for Sqlite-1.3.6
If I try 'rails new blog --skip-bundle', I can successfully create blog, but I think I'm just skirting the issue.
Anyone have any idea what I might be missing? I have the Sqlite3.dll within the path, but still can't get past the Sqlite3.h file not found error.
Thanks
(I know I may have a proxy issue, but I still should be able to install the gem file locally. I've been able to do that for every other requested gem file.)
Go to SQLite3 download page, “Precompiled Binaries For Windows” section
Download “sqlite-shell” and “sqlite-dll” archive files
Unpack them in C:\WINDOWS\system32 folder (or any other that is in your PATH)
Install the sqlite3 Ruby gem.
Having .dlls in system32 is MANDATORY
I really appreciate if one can provide some insight for installing ruby on rails 3.x framework to a computer without internet connection.
All the tutorials or explanations seem to assume that there is always an internet connection. Is there simple way to download a bundle with all the dependencies included and simply install the bundle.
Thanks in advance
Finally. The complete list of Gems that you need to download manually, in order to install Rails in Offline mode (or behind a proxy that prevents your "gem" commands from working).
This list assumes that you already have the following things (Windows 7):
Ruby 1.9.2
RubyGems 1.8.24
DevKit
THE LIST.
Go to rubygems.org and use the Search function to download each one of the following Gems. You don't need to type the complete name with version numbers and stuff. For example, just "actionmailer" will work and will find the latest version).
Each gem page shows you the command line you have to type when installing it normally in a computer that isn't behind a proxy. Ignore it and just click the download link.
actionmailer-3.2.6.gem
actionpack-3.2.6.gem
activerecord-3.2.6.gem
activeresource-3.2.6.gem
activesupport-3.2.6.gem
rake-0.9.2.2.gem
i18n-0.6.0.gem
multi_json-1.3.6.gem
activemodel-3.2.6.gem
arel-3.0.2.gem
tzinfo-0.3.33.gem
builder-3.0.0.gem
erubis-2.7.0.gem
journey-1.0.4.gem
rack-1.4.1.gem
rack-cache-1.2.gem
rack-test-0.6.1.gem
sprockets-2.1.3.gem
hike-1.2.1.gem
tilt-1.3.3.gem
mail-2.4.4.gem
mime-types-1.19.gem
treetop-1.4.10.gem
polyglot-0.3.3.gem
rails-3.2.6.gem
bundler-1.1.4.gem
railties-3.2.6.gem
rack-ssl-1.3.2.gem
rdoc-3.12.gem
thor-0.15.3.gem
JSON-1.7.3.gem
(31 files total)
Just keep in mind that the versions may change. I did this in June 2012 and those were the versions that worked for me.
Copy all those files to the Ruby installation dir.
Then, open a CMD console.
cd \
cd <RubyInstallDir>
gem install rails-3.2.6.gem
Installation should run normally.
It is possible that some dependencies need a different version.
In that case, the error message will show you the right version. So you just need to download the version from rubygems.org (there is a list of old versions in the gem's page) and run the gem install command again.
I hope this can help.
You can use bundler to achive that. Bundler accepts the path where you can specify the location for the gems to be installed. Run the following command where you have internet connection. It will download all the dependencies and pack them into the specified folder.
bundle install --path gems # 'gems' is the folder present in Rails.root
Now that all the dependencies are within the project, you can copy the project to the machine where you don't have internet connection. From now on use the commands like:
bundle exec rails server
bundle exec rails console
Note that you have to install the bundler gem manually in the target machine.
I know that this question refers to Rails 3, but I created PortableRails exactly because of this (which has recently been updated to support Rails 4). Just make sure that you run bundle --local instead of just bundle (which is what the new-action tries to perform).
I followed this tutorial:
How to install Ruby on Rails alongside WampServer?
After adding D:\wamp\ruby\bin (my wamp folder is in D:) to my Path and write gem install rails in the command line I get 2 error which says that the following files couldn't be found:
SSLEAY32.dll
zlib.dll
Here is the screenshot:
Never mind it is fixed by downloading some dlls http://alwaysthecritic.typepad.com/atc/2009/03/install-ruby-191-on-windows.html