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.
Related
I'm trying to execute the
bin/test
command mentioned at http://guides.rubyonrails.org/plugins.html
but I'm getting
$ ./bin/test
-bash: ./bin/test: No such file or directory
Whats up?
I had the same problem as you and I was following the same tutorial as you and the problem was that the command from the tutorial was not generating a bin folder.
This command
rails plugin new yaffle
Was generating a different rails plugin structure to the tutorial
I found that I was on an older version of rails and when I ran rails -v, I was on version 4.2
So I had to make sure I had latest version of rails installed before generating the plugin
gem install rails -v 5.1.3
rails plugin new yaffle
It is only there for rails plugins created with the command
$ rails plugin new yaffle
You should read the docs here: http://guides.rubyonrails.org/testing.html for normal Rails applications.
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'
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;
I got a very limited internet connection on my office laptop and I want to install the 'best-in-place' gem. Since I use rails 4 I need to get the gem from github as far as I understood various threads. But I cant run bundle install with access outside of my local system.
Is it still possible to install that gem somehow? I already downloaded the folder form github and put it into my ruby but its not working that easy.
Best regards!
Edit: If thats not possible, does anyone of you uses an alternative gem with similar functions?
You can always clone it (or download it, as you have) and then access it later.
Let's say that you downloaded it to: /home/user3665315/workspace/best_in_place
Then, in your Gemfile you can access it locally with the :path option
# Gemfile
gem "best_in_place", path: "/home/user3665315/workspace/best_in_place"
then run
bundle install
and that's it, you have it working locally
I am trying to follow the directions on this ud3323/bpm wiki page to create an Ember.js application using bpm. The very first command on this page (bpm init hello_world) is throwing an exception - "No such file or directory - C:/apps/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.2.13/lib/execjs/support/which.bat" (see the issue logged here - my comment is the second one). I checked the files under execjs directory - there is no file called which.bat. Note that I installed bpm using "gem install bpm". I don't know how to build ud3323's fork (don't know Ruby - I installed it just to try out bpm). Can anybody help me get past this issue?
Thanks in advance for your time.
Naresh,
I got some free time and found the issue. The current build of BPM requires the use of the gem execjs version 1.2.4. You probably have the latest version which is 1.3.0 or the latest from the 1.2.x branch.
What you need to do is install the correct version by running the command gem install execjs --version 1.2.4. After that BPM should work fine. I have it running on Windows7 64bit with a clean installation of Ruby 1.9.2.
Also for anyone else, I have detailed instructions of exactly what I did on this page: https://github.com/ud3323/bpm/wiki/Installing-with-Windows