I'm following along with Michael Hartl's Ruby on Rails tutorial and I've run into a roadblock trying to generate an SSH key for git.
When I type:
ssh-keygen -t rsa -C "ben#rockhopperdigital.com"
I get this:
bash: ssh-keygen: command not found
I'm sure it's something stupid, but I'm new to git and Rails in general. Any assistance would be much appreciated (and may garner you a link on my blog). A search for that error in quotations followed by git gave me 0 results on a Google search.
Thanks,
Ben
Which OS are you on? It depends on that. Normally you install openssh package to get the ssh utils which includes ssh-keygen. If you are on debian or ubuntu try to see if you have installed ssh-keygen.
If on windows get openssh for Windows or Putty to generate the key for you.
--Sai
Related
I run Redmine 3.4 with Rails (5.2.0) and Docker 18.03.1-ce on Ubuntu 16.04 Xenial (which is new for me), following this GitHub repository: https://github.com/sameersbn/docker-redmine
I create my Rails app in the same folder where the docker-compose.yml has been created, and cd to it.
Then I have the exact same problem than described in this Redmine post (http://www.redmine.org/boards/3/topics/48309?r=48507#message-48507): when I try the command rails generate redmine_plugin Plug_test, this two error messages appear:
Running via Spring preloader in process 32109
Could not find generator 'redmine_plugin'
So I try the commands that Keith suggested, and running the generate command again, the Spring error message disappear, but the generate command still doesn't work (Could not find generator 'redmine_plugin').
Any idea what to do? I don't know if I'm going in the right direction.
Thanks a lot for your help.
well simple problem, you're running command from outside of your redmine app directory, you need to go into your redmine app directory, after that you can run rails generate redmine_plugin Plugin_test from there
As Ravi mentioned above, you need to go into your redmine app directory instead of your rails app directory.
Or, maybe you can exec plugin generate command via docker run command.
# e.g. In case plugin name is “myplugin"
docker run --name=redmine -it --rm \
--volume=/srv/docker/redmine/redmine:/home/redmine/data \
sameersbn/redmine:3.4.4-2 \
app:rails generate redmine_plugin myplugin
If this works fine, plugin directory named “myplugin” will be generated under /srv/docker/redmine/redmine/plugins/ directory.
Personally, I think, you had batter not use docker to create and development Redmine’s plugin, especially if you are not familiar with Redmine and Docker so much.
I hope this would be any help.
We've been experimenting with CF over Heroku and running into some issues. One of them deals with accessing the rails console in a CF AI. We're using Pivotal's PWS and have tried a number of things, including:
cd app; export HOME=$(pwd); source .profile.d/0_ruby.sh; rails c
and
cd app; export HOME=$(pwd); source .profile.d/*.sh; rails c
Both of which are hit or miss and typically don't work.
It seems a bit ridiculous that it's THIS much work to access the rails console via CF. I feel like there has to be a better, faster way.
Does anyone have any tips?
For anyone saying we should cf ssh in, here is what happens:
vcap#2f4663e4-f876-490c-65e2-a498:~$ cd app
vcap#2f4663e4-f876-490c-65e2-a498:~/app$ ls .profile.d/000_multi-supply.sh 0_ruby.sh
vcap#2f4663e4-f876-490c-65e2-a498:~/app$ source .profile.d/0_ruby.sh
vcap#2f4663e4-f876-490c-65e2-a498:~/app$ cd ..
vcap#2f4663e4-f876-490c-65e2-a498:~$ rails c
bash: rails: command not found
vcap#2f4663e4-f876-490c-65e2-a498:~$ source app/.profile.d/000_multisupply.sh
vcap#2f4663e4-f876-490c-65e2-a498:~$ rails c
bash: rails: command not found
As of writing this, to fire up a Rails console run cf ssh my-app -t -c "/tmp/lifecycle/launcher /home/vcap/app 'rails c' ''".
This will SSH into the container and use the lifecycle launcher, which sets up the environment for you, to execute the command.
How can I open my rails application using google cloud9 cloud service. https://ide.c9.io IDE? What steps do I need to take? I have already copied and pasted application folder in IDE but when I run "bundle exec rails server -b $IP -p $PORT" it doesn't show anything.
I have been using c9 for quite a long time.
This is how to start(assuming you already checked out the code :))..
1. open new terminal
2. run /bin/bash --login
3. rvm use 2.2.2#myapp ---if using rvm
4. sudo /etc/init.d/postgresql start -- start postgres server if using
if you still dont have rails ,install using Ruby version manager AKA rvm..its very easy.
Now run..rails s -b $IP -p $PORT.
So when you server has started successfully,hit the application on the browser using...https://<your-workspace-name>-<your username for git>.c9users.io/..
for me its like...geophotos-mike1011.c9users.io
you may also click top right button Preview ...to preview your app inside your window.
Moreover,you can customise your app setting to be public/private and many more things to do..if you are a premium user :)
Hope it helps.
When starting a new workspace, you have an option to clone from a github repository, there is a box that states Clone from Git or Mecurial URL. Simply fill in the appropriate url from your git repo, choose ruby on rails for the template, and you should be good to go.
Firstly, one of the things you need to note is to add your shh github fingerprint to c9, which will enable you to push to GitHub from c9 afterwards. c9 should put you through the necessary step.
Secondly, follow RailsCasts Tutorial on how to contribute to open source http://railscasts.com/episodes/300-contributing-to-open-source.
I think that's about all you need to make your problem solved.
I am using Putty to connect to my localhost, and I don't have any problems apparently, however, when I run command rails s to start my rails 4.0.0 application from Putty, it gives me this message:
jose#jose-laptop:~/rails/dedicated-agenda$ rails s
The program 'rails' can be found in the following packages:
ruby-railties-3.2
ruby-railties-4.0
Try: sudo apt-get install
I don't get that message from the terminal though, the application starts running just fine.
I had to reinstall ubuntu so I upgraded to ubuntu 14.04 just in case you need to know.
I don't know if I am missing something in my ssh settings or how could I use rails s from Putty.
Thanks in advance.
Your PATH environment variable is set differently when you are executing programs in an interactive shell and by ssh(using putty).
Use absolute path of the program to not depend on the PATH variable.
You can also set the right PATH variable at ~/.profile file and load the updated variables using the command source ~/.profile.
Now, you should be able to run the command.
You can use the command
>which rails
to see where rails is installed on your working session.
Then you need to make sure that is in your path when you ssh in.
If you are ssh'ing in as a different use then that user may not have permission to see the rails executable.
I've just installed Cygwin on Windows 7 to develop RoR apps with, trouble is I am trying to connect Git with my Github account through Cygwin but for some reason when I run the command ssh-keygen -t rsa -C "myemail#etc.com" it gives me back the message "bash: ssh-keygen: command not found"
I am following the Ruby on Rails Tutorial by Michael Hartle by the way but can't seem to find a solution.
Can anyone offer any advice?
Chances are you probably forgot to install the openssh package when you installed Cygwin.
I've used this guide before, and everything was flawless(for ssh):
http://allthingsmarked.com/2006/08/17/how-to-set-up-a-windows-ssh-server-for-vnc-tunneling/